Skip to content

Commit 77c6953

Browse files
committed
review
1 parent e173a1c commit 77c6953

File tree

2 files changed

+39
-14
lines changed

2 files changed

+39
-14
lines changed

WOQL.and(

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
WOQL.and(
2+
WOQL.triple("v:Col", "system:collaborator_user", "doc:User_frabit"),
3+
//WOQL.triple("v:Agent", "system:agent_name", 'frabit'),
4+
WOQL.triple("v:RES", "system:collaborator", "v:Col"),
5+
WOQL.or(
6+
WOQL.triple("v:RES", 'type', 'system:Database')
7+
.triple("v:ORG", 'system:organization_database', 'v:RES')
8+
.eq("v:RES", "v:DB"),
9+
WOQL.triple('v:RES', 'system:organization_database', 'v:DB')
10+
.eq("v:RES", "v:ORG"),
11+
),
12+
WOQL.triple("v:DB", "system:database_name", "v:id")
13+
.triple("v:DB", "system:status", "system:active")
14+
.triple("v:ORG", "system:organization_database", "v:DB")
15+
.triple("v:ORG", "system:organization_name", "v:organization")
16+
.triple("v:ORG", "type", "v:orgtype")
17+
.group_by("v:RES", "v:Perm", "v:DBPerms")
18+
.triple("v:Col", "system:collaborator_permission", "v:Perm"),
19+
WOQL.opt().triple("v:ORG", "label", "v:organization name"),
20+
WOQL.opt().triple("v:ORG", "comment", "v:organization comment"),
21+
WOQL.opt().triple("v:ORG", "system:profile_icon", "v:organization icon"),
22+
WOQL.opt().triple("v:DB", "label", "v:label"),
23+
WOQL.opt().triple("v:DB", "comment", "v:comment"),
24+
//WOQL.opt().triple("v:DB", "system:profile_icon", "v:icon"),
25+
WOQL.opt().triple("v:DB", "system:public", "v:public")
26+
)
27+
28+
WOQL.and(
29+
// WOQL.triple("v:Ag2", "system:agent_name", "fra-bit")
30+
WOQL.triple("v:Col2", "system:collaborator_user", "doc:User_fra-bit")
31+
.triple("v:ORG", "system:collaborator", "v:Col2")
32+
.triple("v:ORG", "system:organization_name", "v:organization")
33+
.triple("v:ORG", "type", "v:orgtype")
34+
.group_by("v:Col2", "v:Perm2", "v:OrgPerms")
35+
.triple("v:Col2", "system:collaborator_permission", "v:Perm2"),
36+
WOQL.opt().triple("v:ORG", "label", "v:organization name"),
37+
WOQL.opt().triple("v:ORG", "comment", "v:organization comment"),
38+
WOQL.opt().triple("v:ORG", "system:profile_icon", "v:organization icon"),
39+
)

lib/query/woqlLibrary.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,20 +1293,6 @@ WOQLLibrary.prototype.assets_overview = function(dbs, client, with_size) {
12931293
let rec = res[i]
12941294
if (rec) {
12951295
formatDBInfo(dbmeta, rec)
1296-
/*if (rec['branches'] && rec['branches'] != 'system:unknown') {
1297-
mbranches = unWindBranches(rec['branches'])
1298-
for (var k in mbranches) {
1299-
dbmeta[k] = mbranches[k]
1300-
}
1301-
}
1302-
if (rec['created'] && rec['created']['@value'])
1303-
dbmeta.created = rec['created']['@value']
1304-
if (rec['remote_url'] && rec['remote_url']['@value'])
1305-
dbmeta.remote_url = rec['remote_url']['@value']
1306-
if (rec['schema'] && rec['schema'] != 'system:unknown') dbmeta.schema = true
1307-
if (rec['size'] && rec['size']['@value']) dbmeta.size = rec['size']['@value']
1308-
if (rec['prefixes'] && rec['prefixes'] != 'system:unknown')
1309-
dbmeta.prefixes = unWindPrefixes(rec['prefixes'])*/
13101296
}
13111297
dbmetas.push(dbmeta)
13121298
}

0 commit comments

Comments
 (0)