metacat/test/test-queries/doc3.sql @ 4693
1 |
SELECT DISTINCT xd.docid,xd.docname,xd.doctype,xd.date_created, xd.date_updated, xd.rev |
---|---|
2 |
FROM xml_documents xd, xml_nodes xn |
3 |
WHERE xd.rootnodeid = xn.rootnodeid |
4 |
AND UPPER(xn.nodedata) LIKE '%' |
5 |
AND ( |
6 |
lower(xd.user_owner) LIKE 'public' |
7 |
OR
|
8 |
(
|
9 |
xd.docid IN |
10 |
(
|
11 |
SELECT docid from xml_access |
12 |
WHERE ( |
13 |
(
|
14 |
lower(principal_name) = 'public' |
15 |
AND perm_type = 'allow' |
16 |
AND (permission='4' OR permission='7') |
17 |
)
|
18 |
OR
|
19 |
(
|
20 |
lower(principal_name) = 'public' |
21 |
AND perm_type = 'allow' |
22 |
AND (permission='4' OR permission='7') |
23 |
)
|
24 |
)
|
25 |
AND subtreeid IS NULL |
26 |
)
|
27 |
AND xd.docid NOT IN |
28 |
(
|
29 |
SELECT docid from xml_access |
30 |
WHERE ( |
31 |
(
|
32 |
lower(principal_name) = 'public' |
33 |
AND perm_type = 'deny' |
34 |
AND perm_order ='allowFirst' |
35 |
AND (permission='4' OR permission='7') |
36 |
)
|
37 |
OR
|
38 |
(
|
39 |
lower(principal_name) = 'public' |
40 |
AND perm_type = 'deny' |
41 |
AND perm_order ='allowFirst' |
42 |
AND (permission='4' OR permission='7') |
43 |
)
|
44 |
)
|
45 |
AND subtreeid IS NULL |
46 |
)
|
47 |
)
|
48 |
)
|
49 |
/
|