metacat/test/test-queries/doc4.sql @ 2882
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 |
(
|
4 |
SELECT docid from xml_access |
5 |
WHERE ( |
6 |
(
|
7 |
lower(principal_name) = 'public' |
8 |
AND perm_type = 'allow' |
9 |
AND (permission='4' OR permission='7') |
10 |
)
|
11 |
OR
|
12 |
(
|
13 |
lower(principal_name) = 'public' |
14 |
AND perm_type = 'allow' |
15 |
AND (permission='4' OR permission='7') |
16 |
)
|
17 |
)
|
18 |
AND subtreeid IS NULL |
19 |
MINUS
|
20 |
SELECT docid from xml_access |
21 |
WHERE ( |
22 |
(
|
23 |
lower(principal_name) = 'public' |
24 |
AND perm_type = 'deny' |
25 |
AND perm_order ='allowFirst' |
26 |
AND (permission='4' OR permission='7') |
27 |
)
|
28 |
OR
|
29 |
(
|
30 |
lower(principal_name) = 'public' |
31 |
AND perm_type = 'deny' |
32 |
AND perm_order ='allowFirst' |
33 |
AND (permission='4' OR permission='7') |
34 |
)
|
35 |
)
|
36 |
AND subtreeid IS NULL |
37 |
) xa |
38 |
WHERE xd.rootnodeid = xn.rootnodeid |
39 |
AND xd.docid = xa.docid |
40 |
AND UPPER(xn.nodedata) LIKE '%' |
41 |
/
|