Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
categories
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
categories
Commits
21510d23
Commit
21510d23
authored
Oct 23, 2010
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed upgrade issue
parent
ab7ce8ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
24 deletions
+36
-24
categories-init.sql
sql/postgresql/categories-init.sql
+36
-24
No files found.
sql/postgresql/categories-init.sql
View file @
21510d23
...
...
@@ -6,23 +6,29 @@
--
-- This should eventually be added to the acs-service-contract installation files
create
or
replace
function
inline_0
()
returns
integer
as
$
body
$
DECLARE
v_count
integer
;
BEGIN
select
count
(
*
)
into
v_count
from
acs_sc_contracts
where
contract_name
=
'AcsObject'
;
IF
v_count
>
0
THEN
return
1
;
END
IF
;
begin
;
select
acs_sc_contract__new
(
select
acs_sc_contract__new
(
'AcsObject'
,
-- contract_name
'Acs Object Id Handler'
-- contract_desc
);
select
acs_sc_msg_type__new
(
);
select
acs_sc_msg_type__new
(
'AcsObject.PageUrl.InputType'
,
-- msg_type_name
'object_id:integer'
-- msg_type_spec
);
select
acs_sc_msg_type__new
(
);
select
acs_sc_msg_type__new
(
'AcsObject.PageUrl.OutputType'
,
-- msg_type_name
'page_url:string'
-- msg_type_spec
);
select
acs_sc_operation__new
(
);
select
acs_sc_operation__new
(
'AcsObject'
,
-- contract_name
'PageUrl'
,
-- operation_name
'Returns the package specific url to a page that displays an object'
,
-- operation_desc
...
...
@@ -30,8 +36,14 @@ begin;
1
,
-- operation_nargs
'AcsObject.PageUrl.InputType'
,
-- operation_inputtype
'AcsObject.PageUrl.OutputType'
-- operation_outputtype
);
end
;
);
return
0
;
end
;
$
body
$
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
-- there should be an implementation of this contract
-- for apm_package, user, group and other object types
...
...
@@ -56,19 +68,19 @@ create index acs_named_objs_package_ix on acs_named_objects(package_id);
create
function
inline_0
()
returns
integer
as
'
begin
PERFORM acs_object_type__create_type (
''
acs_named_object
''
, -- object_type
''
Named Object
''
, -- pretty_name
''
Named Objects
''
, -- pretty_plural
''
acs_object
''
, -- supertype
''
acs_named_objects
''
, -- table_name
''
object_id
''
, -- id_column
null, -- name_method
''
f
''
,
null,
null
);
return 0;
PERFORM acs_object_type__create_type (
''
acs_named_object
''
, -- object_type
''
Named Object
''
, -- pretty_name
''
Named Objects
''
, -- pretty_plural
''
acs_object
''
, -- supertype
''
acs_named_objects
''
, -- table_name
''
object_id
''
, -- id_column
null, -- name_method
''
f
''
,
null,
null
);
return 0;
end;'
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment