Last change
on this file since 2686 was
2686,
checked in by mwindhouwer, 11 years ago
|
Fixed the throtteling:
- all SQL request go through the ISOcat.database throttle (settings in the ISOcat config), also the indirect DBX ones
- big (more then 100 DCs) DCS to DCIF go through the big-dcif throttle (hardcoded settings)
|
File size:
1.5 KB
|
Line | |
---|
1 | <accessor debug="false"> |
---|
2 | <name>ISOcat.access.data.dcs.exists</name> |
---|
3 | <descr>Does this DCS already exist?</descr> |
---|
4 | <param mandatory="true"> |
---|
5 | <name>owner</name> |
---|
6 | <descr>the DCS owner</descr> |
---|
7 | <type canonical="true">string</type> |
---|
8 | </param> |
---|
9 | <param mandatory="true"> |
---|
10 | <name>name</name> |
---|
11 | <descr>the DCS name</descr> |
---|
12 | <type canonical="true">string</type> |
---|
13 | </param> |
---|
14 | <idoc> |
---|
15 | <instr> |
---|
16 | <type>ISOcat.access.data.user.id</type> |
---|
17 | <user>var:owner</user> |
---|
18 | <target>var:uid</target> |
---|
19 | </instr> |
---|
20 | <instr> |
---|
21 | <type>sloot.xquery</type> |
---|
22 | <operator> |
---|
23 | <xquery> |
---|
24 | declare variable $uid as node() external; |
---|
25 | declare variable $name as node() external; |
---|
26 | |
---|
27 | <sql> |
---|
28 | SELECT |
---|
29 | id |
---|
30 | FROM |
---|
31 | core_data_category_selection |
---|
32 | WHERE |
---|
33 | "owner" = {string($uid)} |
---|
34 | AND |
---|
35 | "name" = '{replace(string($name),"'","\\'")}' |
---|
36 | ; |
---|
37 | </sql> |
---|
38 | </xquery> |
---|
39 | </operator> |
---|
40 | <uid>var:uid</uid> |
---|
41 | <name>var:name</name> |
---|
42 | <target>var:sql</target> |
---|
43 | </instr> |
---|
44 | <accessor-debug> |
---|
45 | <instr> |
---|
46 | <type>copy</type> |
---|
47 | <operand>var:sql</operand> |
---|
48 | <target>ffcpl:/trace/dcs_exists.sql.xml</target> |
---|
49 | </instr> |
---|
50 | </accessor-debug> |
---|
51 | <instr> |
---|
52 | <type>isocat.sqlBooleanQuery</type> |
---|
53 | <operand>var:sql</operand> |
---|
54 | <target>this:response</target> |
---|
55 | </instr> |
---|
56 | </idoc> |
---|
57 | <exception> |
---|
58 | <debug/> |
---|
59 | <trace>ffcpl:/trace/dcs_exists.exception.xml</trace> |
---|
60 | <throw/> |
---|
61 | </exception> |
---|
62 | <response> |
---|
63 | <debug>ffcpl:/trace/dcs_exists.response.xml</debug> |
---|
64 | <mime>application/xml</mime> |
---|
65 | <expire>now</expire> |
---|
66 | </response> |
---|
67 | </accessor> |
---|
Note: See
TracBrowser
for help on using the repository browser.