-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArtificerRepo_artificer.sql
111 lines (111 loc) · 20.1 KB
/
ArtificerRepo_artificer.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
create table StoredQuery ( queryName varchar2(255 char) not null, queryExpression varchar2(255 char), primary key (queryName) )
create table StoredQuery_propertyNames ( StoredQuery_queryName varchar2(255 char) not null, propertyNames varchar2(255 char) )
create table Relationship ( id bigint generated by default as identity, name varchar(255), type integer, owner_id bigint not null, primary key (id) )
create table Relationship ( id number(19,0) not null, name varchar2(255 char), type number(10,0), owner_id number(19,0) not null, primary key (id) )
create table WsdlDerived_WsdlDerived ( WsdlDerived_id int8 not null, extension_id int8 not null )
create table WsdlDocument ( id int8 not null, primary key (id) )
create table ArtifactComment ( id number(19,0) not null, lastActionTime timestamp, username varchar2(50 char), text varchar2(255 char), artifact_id number(19,0) not null, primary key (id) )
create table Ontology ( surrogateId number(19,0) not null, base varchar2(255 char), annotation varchar2(255 char), createdBy varchar2(255 char), createdOn date, id varchar2(255 char), label varchar2(255 char), lastModifiedBy varchar2(255 char), lastModifiedOn date, uuid char(36), primary key (surrogateId) )
create table Relationship_otherAttributes ( Relationship_id bigint not null, otherAttributes varchar(255), otherAttributes_KEY varchar(255) not null, primary key (Relationship_id, otherAttributes_KEY) )
SELECT au FROM ArtificerAuditEntry au INNER JOIN au.artifact a WHERE a.uuid=:uuid ORDER BY au.id DESC
create table Artifact_classifiers ( Artifact_id number(19,0) not null, classifiers varchar2(255 char) )
create table Target_otherAttributes ( Target_id int8 not null, otherAttributes varchar(255), otherAttributes_KEY varchar(255), primary key (Target_id, otherAttributes_KEY) )
create table Target ( id bigint identity not null, targetType varchar(255), relationship_id bigint not null, target_id bigint not null, primary key (id) )
create table XsdDocument_Artifact ( XsdDocument_id int8 not null, simpleTypes_id int8 not null, elements_id int8 not null, complexTypes_id int8 not null, attributes_id int8 not null )
create table Ontology ( surrogateId bigint not null auto_increment, base varchar(255), annotation longtext, createdBy varchar(255), createdOn date, id varchar(255), label varchar(255), lastModifiedBy varchar(255), lastModifiedOn date, uuid char(36), primary key (surrogateId) )
create table AuditItem ( id bigint identity not null, type varchar(20), auditEntry_id bigint, primary key (id) )
create index artifact_type_idx on Artifact (
create table AuditItem ( id bigint not null auto_increment, type varchar(20), auditEntry_id bigint, primary key (id) )
create table WsdlDocument_Artifact ( WsdlDocument_id bigint not null, simpleTypes_id bigint not null, elements_id bigint not null, complexTypes_id bigint not null, attributes_id bigint not null )
create table AuditItem_properties ( AuditItem_id number(19,0) not null, properties varchar2(255 char), properties_KEY varchar2(255 char), primary key (AuditItem_id, properties_KEY) )
create table WsdlDocument_Artifact ( WsdlDocument_id number(19,0) not null, simpleTypes_id number(19,0) not null, elements_id number(19,0) not null, complexTypes_id number(19,0) not null, attributes_id number(19,0) not null )
create table AuditItem_properties ( AuditItem_id bigint not null, properties varchar(255), properties_KEY varchar(255), primary key (AuditItem_id, properties_KEY) )
create table AuditEntry ( id number(19,0) not null, lastActionTime timestamp, username varchar2(50 char), type varchar2(20 char), uuid char(36), artifact_id number(19,0), primary key (id) )
create table XsdDocument ( id bigint not null, primary key (id) )
create table AuditEntry ( id bigint identity not null, lastActionTime datetime2, username varchar(50), type varchar(20), uuid char(36), artifact_id bigint, primary key (id) )
create index artifact_model_type_idx on Artifact (model,
create table Relationship_otherAttributes ( Relationship_id int8 not null, otherAttributes varchar(255), otherAttributes_KEY varchar(255), primary key (Relationship_id, otherAttributes_KEY) )
create table Relationship_otherAttributes ( Relationship_id bigint not null, otherAttributes varchar(255), otherAttributes_KEY varchar(255), primary key (Relationship_id, otherAttributes_KEY) )
create table XsdDocument ( id number(19,0) not null, primary key (id) )
create table AuditItem_properties ( AuditItem_id bigint not null, properties varchar(255), properties_KEY varchar(255) not null, primary key (AuditItem_id, properties_KEY) )
create table Artifact ( id bigint identity not null, content varbinary(MAX), contentEncoding varchar(255), contentHash char(40), contentPath varchar(255), contentSize bigint not null, createdTime datetime2, createdByUsername varchar(50), derived bit not null, description varchar(MAX), expandedFromArchive bit not null, expandedFromArchivePath varchar(255), mimeType varchar(100), model varchar(255), modifiedTime datetime2, modifiedByUsername varchar(50), name varchar(255), trashed bit not null, type varchar(255), uuid char(36), version varchar(255), derivedFrom_id bigint, expandedFrom_id bigint, primary key (id) )
create table Target ( id int8 not null, targetType varchar(255), relationship_id int8 not null, target_id int8 not null, primary key (id) )
create table ArtifactComment ( id int8 not null, lastActionTime timestamp, username varchar(50), text text, artifact_id int8 not null, primary key (id) )
SELECT au FROM ArtificerAuditEntry au WHERE au.uuid=:uuid ORDER BY au.id DESC
create table Document ( id number(19,0) not null, primary key (id) )
create table ArtifactComment ( id bigint identity not null, lastActionTime datetime2, username varchar(50), text varchar(MAX), artifact_id bigint not null, primary key (id) )
create table StoredQuery_propertyNames ( StoredQuery_queryName varchar(255) not null, propertyNames varchar(255) )
create table WsdlDocument_WsdlDerived ( WsdlDocument_id int8 not null, services_id int8 not null, ports_id int8 not null, portTypes_id int8 not null, parts_id int8 not null, operations_id int8 not null, operationOutputs_id int8 not null, operationInputs_id int8 not null, messages_id int8 not null, faults_id int8 not null, extensions_id int8 not null, bindings_id int8 not null, bindingOperations_id int8 not null, bindingOperationOutputs_id int8 not null, bindingOperationInputs_id int8 not null, bindingOperationFaults_id int8 not null )
create table AuditItem ( id int8 not null, type varchar(20), auditEntry_id int8, primary key (id) )
create table AuditItem_properties ( AuditItem_id int8 not null, properties varchar(255), properties_KEY varchar(255), primary key (AuditItem_id, properties_KEY) )
create table Ontology ( surrogateId bigint generated by default as identity, base varchar(255), annotation clob, createdBy varchar(255), createdOn date, id varchar(255), label varchar(255), lastModifiedBy varchar(255), lastModifiedOn date, uuid char(36), primary key (surrogateId) )
create table AuditItem ( id bigint generated by default as identity, type varchar(20), auditEntry_id bigint, primary key (id) )
create table Relationship ( id bigint not null auto_increment, name varchar(255), type integer, owner_id bigint not null, primary key (id) )
create table AuditEntry ( id bigint generated by default as identity, lastActionTime timestamp, username varchar(50), type varchar(20), uuid char(36), artifact_id bigint, primary key (id) )
create table XsdDocument ( id int8 not null, primary key (id) )
create table Relationship_otherAttributes ( Relationship_id number(19,0) not null, otherAttributes varchar2(255 char), otherAttributes_KEY varchar2(255 char), primary key (Relationship_id, otherAttributes_KEY) )
create table WsdlDocument_Artifact ( WsdlDocument_id int8 not null, simpleTypes_id int8 not null, elements_id int8 not null, complexTypes_id int8 not null, attributes_id int8 not null )
create table Property ( id bigint generated by default as identity, custom smallint not null, propertyKey varchar(255), propertyValue varchar(255), owner_id bigint not null, primary key (id) )
create table StoredQuery ( queryName varchar(255) not null, queryExpression varchar(255), primary key (queryName) )
create table OntologyClass ( surrogateId bigint identity not null, annotation varchar(MAX), id varchar(255), label varchar(255), uri varchar(255), parent_surrogateId bigint, root_surrogateId bigint, primary key (surrogateId) )
create table XsdDocument_Artifact ( XsdDocument_id bigint not null, simpleTypes_id bigint not null, elements_id bigint not null, complexTypes_id bigint not null, attributes_id bigint not null )
create table OntologyClass ( surrogateId bigint generated by default as identity, annotation clob, id varchar(255), label varchar(255), uri varchar(255), parent_surrogateId bigint, root_surrogateId bigint, primary key (surrogateId) )
create table Artifact_classifiers ( Artifact_id bigint not null, classifiers varchar(255) )
create index storedquery_name_idx on StoredQuery (queryName);
create table Artifact ( id bigint not null auto_increment, content longblob, contentEncoding varchar(255), contentHash char(40), contentPath varchar(255), contentSize bigint not null, createdTime datetime, createdByUsername varchar(50), derived boolean not null, description longtext, expandedFromArchive boolean not null, expandedFromArchivePath varchar(255), mimeType varchar(100), model varchar(255), modifiedTime datetime, modifiedByUsername varchar(50), name varchar(255), trashed boolean not null, type varchar(255), uuid char(36), version varchar(255), derivedFrom_id bigint, expandedFrom_id bigint, primary key (id) )
create table Ontology ( surrogateId bigint generated by default as identity, base varchar(255), annotation varchar(255), createdBy varchar(255), createdOn date, id varchar(255), label varchar(255), lastModifiedBy varchar(255), lastModifiedOn date, uuid char(36), primary key (surrogateId) )
create index relationship_name_idx on Relationship (name);
create table Ontology ( surrogateId bigint identity not null, base varchar(255), annotation varchar(MAX), createdBy varchar(255), createdOn date, id varchar(255), label varchar(255), lastModifiedBy varchar(255), lastModifiedOn date, uuid char(36), primary key (surrogateId) )
create table Artifact_normalizedClassifiers ( Artifact_id int8 not null, normalizedClassifiers varchar(255) )
create table Artifact_normalizedClassifiers ( Artifact_id number(19,0) not null, normalizedClassifiers varchar2(255 char) )
create table Artifact ( id int8 not null, content oid, contentEncoding varchar(255), contentHash char(40), contentPath varchar(255), contentSize int8 not null, createdTime timestamp, createdByUsername varchar(50), derived boolean not null, description text, expandedFromArchive boolean not null, expandedFromArchivePath varchar(255), mimeType varchar(100), model varchar(255), modifiedTime timestamp, modifiedByUsername varchar(50), name varchar(255), trashed boolean not null, type varchar(255), uuid char(36), version varchar(255), derivedFrom_id int8, expandedFrom_id int8, primary key (id) )
SELECT count(au) FROM ArtificerAuditEntry au WHERE au.modifiedBy.username=:username
create index artifact_model_idx on Artifact (model, trashed);
create table WsdlDerived_WsdlDerived ( WsdlDerived_id number(19,0) not null, extension_id number(19,0) not null )
create table Artifact ( id bigint generated by default as identity, content blob, contentEncoding varchar(255), contentHash char(40), contentPath varchar(255), contentSize bigint not null, createdTime timestamp, createdByUsername varchar(50), derived boolean not null, description clob, expandedFromArchive boolean not null, expandedFromArchivePath varchar(255), mimeType varchar(100), model varchar(255), modifiedTime timestamp, modifiedByUsername varchar(50), name varchar(255), trashed boolean not null, type varchar(255), uuid char(36), version varchar(255), derivedFrom_id bigint, expandedFrom_id bigint, primary key (id) )
create table Relationship ( id int8 not null, name varchar(255), type int4, owner_id int8 not null, primary key (id) )
create table Property ( id bigint not null auto_increment, custom boolean not null, propertyKey varchar(255), propertyValue varchar(255), owner_id bigint not null, primary key (id) )
create table OntologyClass ( surrogateId number(19,0) not null, annotation varchar2(255 char), id varchar2(255 char), label varchar2(255 char), uri varchar2(255 char), parent_surrogateId number(19,0), root_surrogateId number(19,0), primary key (surrogateId) )
create table Target ( id number(19,0) not null, targetType varchar2(255 char), relationship_id number(19,0) not null, target_id number(19,0) not null, primary key (id) )
create table OntologyClass ( surrogateId bigint not null auto_increment, annotation longtext, id varchar(255), label varchar(255), uri varchar(255), parent_surrogateId bigint, root_surrogateId bigint, primary key (surrogateId) )
create table Artifact_normalizedClassifiers ( Artifact_id bigint not null, normalizedClassifiers varchar(255) )
create index artifact_uuid_idx on Artifact (uuid, trashed);
create table Property ( id number(19,0) not null, custom number(1,0) not null, propertyKey varchar2(255 char), propertyValue varchar2(255 char), owner_id number(19,0) not null, primary key (id) )
create table Document ( id bigint not null, primary key (id) )
create table AuditEntry ( id int8 not null, lastActionTime timestamp, username varchar(50), type varchar(20), uuid char(36), artifact_id int8, primary key (id) )
create table Target ( id bigint not null auto_increment, targetType varchar(255), relationship_id bigint not null, target_id bigint not null, primary key (id) )
create table XsdDocument_Artifact ( XsdDocument_id number(19,0) not null, simpleTypes_id number(19,0) not null, elements_id number(19,0) not null, complexTypes_id number(19,0) not null, attributes_id number(19,0) not null )
create table Artifact ( id number(19,0) not null, content blob, contentEncoding varchar2(255 char), contentHash char(40), contentPath varchar2(255 char), contentSize number(19,0) not null, createdTime timestamp, createdByUsername varchar2(50 char), derived number(1,0) not null, description varchar2(255 char), expandedFromArchive number(1,0) not null, expandedFromArchivePath varchar2(255 char), mimeType varchar2(100 char), model varchar2(255 char), modifiedTime timestamp, modifiedByUsername varchar2(50 char), name varchar2(255 char), trashed number(1,0) not null, type varchar2(255 char), uuid char(36), version varchar2(255 char), derivedFrom_id number(19,0), expandedFrom_id number(19,0), primary key (id) )
SELECT count(au) FROM ArtificerAuditEntry au INNER JOIN au.artifact a WHERE a.uuid=:uuid
create table ArtifactComment ( id bigint generated by default as identity, lastActionTime timestamp, username varchar(50), text clob, artifact_id bigint not null, primary key (id) )
create table Property ( id bigint generated by default as identity, custom boolean not null, propertyKey varchar(255), propertyValue varchar(255), owner_id bigint not null, primary key (id) )
create table Artifact ( id bigint generated by default as identity, content blob, contentEncoding varchar(255), contentHash char(40), contentPath varchar(255), contentSize bigint not null, createdTime timestamp, createdByUsername varchar(50), derived smallint not null, description varchar(255), expandedFromArchive smallint not null, expandedFromArchivePath varchar(255), mimeType varchar(100), model varchar(255), modifiedTime timestamp, modifiedByUsername varchar(50), name varchar(255), trashed smallint not null, type varchar(255), uuid char(36), version varchar(255), derivedFrom_id bigint, expandedFrom_id bigint, primary key (id) )
create table OntologyClass ( surrogateId int8 not null, annotation text, id varchar(255), label varchar(255), uri varchar(255), parent_surrogateId int8, root_surrogateId int8, primary key (surrogateId) )
create table OntologyClass ( surrogateId bigint generated by default as identity, annotation varchar(255), id varchar(255), label varchar(255), uri varchar(255), parent_surrogateId bigint, root_surrogateId bigint, primary key (surrogateId) )
create table Property ( id int8 not null, custom boolean not null, propertyKey varchar(255), propertyValue varchar(255), owner_id int8 not null, primary key (id) )
create table Target ( id bigint generated by default as identity, targetType varchar(255), relationship_id bigint not null, target_id bigint not null, primary key (id) )
create index artifact_name_idx on Artifact (name, trashed);
create table WsdlDocument_WsdlDerived ( WsdlDocument_id number(19,0) not null, services_id number(19,0) not null, ports_id number(19,0) not null, portTypes_id number(19,0) not null, parts_id number(19,0) not null, operations_id number(19,0) not null, operationOutputs_id number(19,0) not null, operationInputs_id number(19,0) not null, messages_id number(19,0) not null, faults_id number(19,0) not null, extensions_id number(19,0) not null, bindings_id number(19,0) not null, bindingOperations_id number(19,0) not null, bindingOperationOutputs_id number(19,0) not null, bindingOperationInputs_id number(19,0) not null, bindingOperationFaults_id number(19,0) not null )
create table WsdlDerived ( id int8 not null, primary key (id) )
create table WsdlDerived_WsdlDerived ( WsdlDerived_id bigint not null, extension_id bigint not null )
select * FROM twitterview.getTweets;
create table WsdlDerived ( id number(19,0) not null, primary key (id) )
create table Ontology ( surrogateId int8 not null, base varchar(255), annotation text, createdBy varchar(255), createdOn date, id varchar(255), label varchar(255), lastModifiedBy varchar(255), lastModifiedOn date, uuid char(36), primary key (surrogateId) )
create table AuditItem ( id number(19,0) not null, type varchar2(20 char), auditEntry_id number(19,0), primary key (id) )
create table Target_otherAttributes ( Target_id bigint not null, otherAttributes varchar(255), otherAttributes_KEY varchar(255) not null, primary key (Target_id, otherAttributes_KEY) )
create table ArtifactComment ( id bigint not null auto_increment, lastActionTime datetime, username varchar(50), text longtext, artifact_id bigint not null, primary key (id) )
create table WsdlDerived ( id bigint not null, primary key (id) )
create table WsdlDocument_WsdlDerived ( WsdlDocument_id bigint not null, services_id bigint not null, ports_id bigint not null, portTypes_id bigint not null, parts_id bigint not null, operations_id bigint not null, operationOutputs_id bigint not null, operationInputs_id bigint not null, messages_id bigint not null, faults_id bigint not null, extensions_id bigint not null, bindings_id bigint not null, bindingOperations_id bigint not null, bindingOperationOutputs_id bigint not null, bindingOperationInputs_id bigint not null, bindingOperationFaults_id bigint not null )
create table Target_otherAttributes ( Target_id number(19,0) not null, otherAttributes varchar2(255 char), otherAttributes_KEY varchar2(255 char), primary key (Target_id, otherAttributes_KEY) )
create table Relationship ( id bigint identity not null, name varchar(255), type int, owner_id bigint not null, primary key (id) )
SELECT r FROM ArtificerRelationship r INNER JOIN r.owner o INNER JOIN r.targets ts INNER JOIN ts.target t WHERE o.trashed = false AND t.id IN :targetedArtifacts AND (r.type=:type1 OR r.type=:type2)
create table Target_otherAttributes ( Target_id bigint not null, otherAttributes varchar(255), otherAttributes_KEY varchar(255), primary key (Target_id, otherAttributes_KEY) )
create table Property ( id bigint identity not null, custom bit not null, propertyKey varchar(255), propertyValue varchar(255), owner_id bigint not null, primary key (id) )
create table AuditEntry ( id bigint not null auto_increment, lastActionTime datetime, username varchar(50), type varchar(20), uuid char(36), artifact_id bigint, primary key (id) )
create table WsdlDocument ( id number(19,0) not null, primary key (id) )
create table WsdlDocument ( id bigint not null, primary key (id) )
create table Artifact_classifiers ( Artifact_id int8 not null, classifiers varchar(255) )
create table Document ( id int8 not null, primary key (id) )
create table Document( id bigint not null, primary key (id) )
SELECT r FROM ArtificerRelationship r INNER JOIN r.targets ts INNER JOIN ts.target t WHERE t.id IN :targetedArtifacts
SELECT au FROM ArtificerAuditEntry au WHERE au.modifiedBy.username=:username ORDER BY au.id DESC