Merge lp:~zorba-coders/zorba/xquery3.0_funcs into lp:zorba
- xquery3.0_funcs
- Merge into trunk
Status: | Superseded | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~zorba-coders/zorba/xquery3.0_funcs | ||||||||||||||||
Merge into: | lp:zorba | ||||||||||||||||
Diff against target: |
45868 lines (+22438/-22671) 85 files modified
ChangeLog (+13/-15) modules/w3c/xpath_functions.xq (+17/-1) src/compiler/translator/translator.cpp (+4/-0) src/functions/pregenerated/func_accessors.cpp (+20/-0) src/functions/pregenerated/func_accessors.h (+17/-1) src/functions/pregenerated/func_collections.cpp (+901/-934) src/functions/pregenerated/func_collections.h (+675/-690) src/functions/pregenerated/func_nodes.cpp (+44/-0) src/functions/pregenerated/func_nodes.h (+15/-0) src/functions/pregenerated/func_parse_fragment.cpp (+1/-1) src/functions/pregenerated/func_sequences.cpp (+775/-923) src/functions/pregenerated/func_sequences.h (+633/-708) src/functions/pregenerated/func_strings.cpp (+922/-895) src/functions/pregenerated/function_enum.h (+4/-0) src/runtime/accessors/accessors_impl.cpp (+1/-2) src/runtime/accessors/pregenerated/accessors.cpp (+221/-221) src/runtime/accessors/pregenerated/accessors.h (+314/-314) src/runtime/any_uri/pregenerated/any_uri.cpp (+60/-60) src/runtime/any_uri/pregenerated/any_uri.h (+76/-76) src/runtime/base64/pregenerated/base64.cpp (+82/-82) src/runtime/base64/pregenerated/base64.h (+110/-110) src/runtime/booleans/pregenerated/booleans.cpp (+104/-104) src/runtime/booleans/pregenerated/booleans.h (+144/-144) src/runtime/collections/pregenerated/collections.cpp (+779/-803) src/runtime/collections/pregenerated/collections.h (+1476/-1527) src/runtime/context/pregenerated/context.cpp (+148/-148) src/runtime/context/pregenerated/context.h (+212/-212) src/runtime/debug/pregenerated/debug_iterator.cpp (+75/-75) src/runtime/debug/pregenerated/debug_iterator.h (+135/-135) src/runtime/durations_dates_times/pregenerated/durations_dates_times.cpp (+500/-500) src/runtime/durations_dates_times/pregenerated/durations_dates_times.h (+756/-756) src/runtime/errors_and_diagnostics/pregenerated/errors_and_diagnostics.cpp (+100/-100) src/runtime/errors_and_diagnostics/pregenerated/errors_and_diagnostics.h (+125/-125) src/runtime/errors_and_diagnostics/pregenerated/other_diagnostics.cpp (+105/-105) src/runtime/errors_and_diagnostics/pregenerated/other_diagnostics.h (+174/-174) src/runtime/fetch/pregenerated/fetch.cpp (+82/-82) src/runtime/fetch/pregenerated/fetch.h (+112/-112) src/runtime/fnput/pregenerated/fnput.cpp (+60/-60) src/runtime/fnput/pregenerated/fnput.h (+76/-76) src/runtime/function_item/pregenerated/function_item_iter.cpp (+107/-107) src/runtime/function_item/pregenerated/function_item_iter.h (+155/-155) src/runtime/indexing/pregenerated/ic_ddl.cpp (+93/-93) src/runtime/indexing/pregenerated/ic_ddl.h (+167/-167) src/runtime/introspection/pregenerated/sctx.cpp (+662/-662) src/runtime/introspection/pregenerated/sctx.h (+1110/-1110) src/runtime/json/pregenerated/json.cpp (+82/-82) src/runtime/json/pregenerated/json.h (+114/-114) src/runtime/maths/pregenerated/maths.cpp (+538/-538) src/runtime/maths/pregenerated/maths.h (+952/-952) src/runtime/nodes/nodes_impl.cpp (+117/-0) src/runtime/nodes/pregenerated/node_position.cpp (+566/-566) src/runtime/nodes/pregenerated/node_position.h (+858/-858) src/runtime/nodes/pregenerated/nodes.cpp (+502/-480) src/runtime/nodes/pregenerated/nodes.h (+763/-729) src/runtime/numerics/pregenerated/numerics.cpp (+192/-192) src/runtime/numerics/pregenerated/numerics.h (+290/-290) src/runtime/parsing_and_serializing/parse_fragment_impl.cpp (+65/-13) src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp (+0/-1) src/runtime/parsing_and_serializing/pregenerated/parse_fragment.cpp (+15/-15) src/runtime/parsing_and_serializing/pregenerated/parse_fragment.h (+11/-11) src/runtime/parsing_and_serializing/pregenerated/parsing_and_serializing.cpp (+82/-82) src/runtime/parsing_and_serializing/pregenerated/parsing_and_serializing.h (+112/-112) src/runtime/qnames/pregenerated/qnames.cpp (+193/-193) src/runtime/qnames/pregenerated/qnames.h (+329/-329) src/runtime/random/pregenerated/random.cpp (+128/-128) src/runtime/random/pregenerated/random.h (+177/-177) src/runtime/schema/pregenerated/schema.cpp (+122/-122) src/runtime/schema/pregenerated/schema.h (+187/-187) src/runtime/sequences/pregenerated/sequences.cpp (+846/-962) src/runtime/sequences/pregenerated/sequences.h (+1403/-1622) src/runtime/spec/accessors/accessors.xml (+5/-2) src/runtime/spec/nodes/nodes.xml (+27/-0) src/runtime/spec/parsing_and_serializing/parse_fragment.xml (+32/-3) src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml (+3/-3) src/runtime/store/pregenerated/documents.cpp (+151/-151) src/runtime/store/pregenerated/documents.h (+240/-240) src/runtime/store/pregenerated/maps.cpp (+242/-242) src/runtime/store/pregenerated/maps.h (+368/-368) src/runtime/uris/pregenerated/uris.cpp (+60/-60) src/runtime/uris/pregenerated/uris.h (+80/-80) src/runtime/visitors/pregenerated/planiter_visitor.h (+8/-3) src/runtime/visitors/pregenerated/printer_visitor.cpp (+19/-5) src/runtime/visitors/pregenerated/printer_visitor.h (+5/-2) src/runtime/xqdoc/pregenerated/xqdoc.cpp (+82/-82) src/runtime/xqdoc/pregenerated/xqdoc.h (+110/-110) |
||||||||||||||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/xquery3.0_funcs | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Pending | ||
Review via email: mp+104329@code.launchpad.net |
This proposal supersedes a proposal from 2012-04-11.
This proposal has been superseded by a proposal from 2012-05-02.
Commit message
XQuery 3.0 Functions (path, has-children#0, nilled#0)
Description of the change
Added XQuery 3.0 Functions
path, has-children#0, nilled#0
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal | # |
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal | # |
> - The fn:path functions returns a wrong result for the following doc/query:
>
> doc.xml
> <a><b/><b/></a>
>
> fn:path(
> /"":a[2]/"":b[1]
Oh It seems I used the wrong value for the position. I have a question about this I was using Item->getRefCount() for the value of the position of the node, but it appears to be wrong is that info on the node stored anywhere else? if not should I implement it as info inside the Item? or just for the function?
>
> - As far as I understood from the spec, fn:parse-
> true for the query
>
> fn:parse-
> document-node()
I will take a look on this
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal | # |
> > - The fn:path functions returns a wrong result for the following doc/query:
> >
> > doc.xml
> > <a><b/><b/></a>
> >
> > fn:path(
> > /"":a[2]/"":b[1]
> Oh It seems I used the wrong value for the position. I have a question about
> this I was using Item->getRefCount() for the value of the position of the
> node, but it appears to be wrong is that info on the node stored anywhere
> else? if not should I implement it as info inside the Item? or just for the
> function?
getRefCount() returns the number of references to the node. It cannot be used as the position among siblings. I'm afraid there is no such information stored in a node. You probably have to count the number of preceding siblings, i.e. go to the parent and iterate over the children until you reached the node in question.
Zorba Build Bot (zorba-buildbot) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
- 10743. By Matthias Brantner
-
commit of generated files
- 10744. By Matthias Brantner
-
commit of more pregenerated files
- 10745. By Matthias Brantner
-
fixed failing tests
- 10747. By Nicolae Brinza
-
Enabled fn:parse-
xml-fragment( ) which now correctly retuns only one document node holding all the fragments - 10748. By Nicolae Brinza
-
Fixed a new bug in the parse-fragment code reported by Juan. Added relevant testcases
- 10749. By Nicolae Brinza
-
Merged with Zorba trunk.
- 10750. By Nicolae Brinza
-
Fixed a reported bug in the parse-fragment code.
- 10751. By Nicolae Brinza
-
Merged with Zorba trunk
- 10752. By Juan Zacarias
-
Fixed failing tests
- 10753. By Nicolae Brinza
-
Fixed the parse-fragment() bug where an empty string input would not return a document node.
- 10754. By Juan Zacarias
-
updated changelog
- 10755. By Nicolae Brinza
-
Merged with Zorba trunk
- 10756. By Nicolae Brinza
-
Fixed the Changelog note for the fn:parse-
xml-fragment# 1 implementation - 10757. By Nicolae Brinza
-
Merged with Zorba trunk
- 10758. By Nicolae Brinza
-
Fixed the fn:parse-
xml-fragment( ) pregenerated files so that Zorba now correctly builds - 10759. By Nicolae Brinza
-
Fixed the backwards-
compatible zorba:parse- xml-fragment( ) function so that it works with the 'w' option enabled
Unmerged revisions
Preview Diff
1 | === modified file 'ChangeLog' |
2 | --- ChangeLog 2012-05-01 15:54:27 +0000 |
3 | +++ ChangeLog 2012-05-02 06:32:20 +0000 |
4 | @@ -3,11 +3,15 @@ |
5 | version 2.5 |
6 | |
7 | New Features: |
8 | - * fn:available-environment-variables |
9 | - * fn:environment-variables |
10 | - * fn:uri-collection |
11 | - * fn:unparsed-text |
12 | - * fn:unparsed-text-available |
13 | + * XQuery 3.0 functions |
14 | + - fn:available-environment-variables |
15 | + - fn:environment-variables |
16 | + - fn:uri-collection |
17 | + - fn:unparsed-text |
18 | + - fn:unparsed-text-available |
19 | + - fn:has-children#0 |
20 | + - fn:nilled#0 |
21 | + - fn:path |
22 | * Extended API for Python, Java, PHP and Ruby. |
23 | * Add jvm classpath to zorbacmd and to Zorba API. Tracked by #931816 |
24 | * Added full-text module. |
25 | @@ -15,14 +19,11 @@ |
26 | * Added XQJ support. |
27 | * Added CollectionManager and DocumentManager support for XQJ. |
28 | |
29 | -Optimization: |
30 | - |
31 | Bug Fixes/Other Changes: |
32 | * Fixed bugs #931501 and #866987 (improved error messages for fn:format-number(). Additionally, the function now throws the FODF1310 error instead of XTDE1310, as the 3.0 spec requires) |
33 | * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest) |
34 | * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions) |
35 | - * Fixed bug #986075 (encountering flwor expr with no clauses; due to common |
36 | - subexression being formed when inlining var in if-then-else expression) |
37 | + * Fixed bug #986075 (encountering flwor expr with no clauses; due to common subexression being formed when inlining var in if-then-else expression) |
38 | * Fixed bug #967864 (var substitution did not update theFreeVars property) |
39 | * Fixed bug #891650 (context size var not always declared within path expr) |
40 | * Fixed bug #948879 (--uri-path doesn't work with fetch:content()) |
41 | @@ -36,17 +37,14 @@ |
42 | * Fixed bug #988412 (date:current-dateTime daylight saving) |
43 | * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation) |
44 | * Fixed bug #921458 (file:read-text-lines() blocking) |
45 | - * Fixed bug #981405 (do not hoist expr containing try-catch variables out of the |
46 | - associated try-catch expression) |
47 | - * Fixed bug #947627 (throw XQST0099 if more than one declarations of context item |
48 | - type in same module) |
49 | + * Fixed bug #981405 (do not hoist expr containing try-catch variables out of the associated try-catch expression) |
50 | + * Fixed bug #947627 (throw XQST0099 if more than one declarations of context item type in same module) |
51 | * Fixed bug #980526 (no-copy rule bug due to global var being set in "distant" udf) |
52 | * Fixed bug #949910 (has-children may be invoked on all nodes). Internally, zorba::store::Item::getChildren() now returns NULL on node classes without offspring (instead of raising an error). |
53 | - * Fixed Bug #933490: Error ItemFactoryImpl::createBase64Binary with istream |
54 | + * Fixed Bug #933490 (Error ItemFactoryImpl::createBase64Binary with istream) |
55 | * Fixed bug #867112 (Diagnostic Handler was not working on external APIs) |
56 | * Fixed bug #857842 (Assertion failed with simple content element with comments) |
57 | |
58 | - |
59 | version 2.2 |
60 | |
61 | New Features: |
62 | |
63 | === modified file 'modules/w3c/xpath_functions.xq' |
64 | --- modules/w3c/xpath_functions.xq 2012-04-24 12:39:38 +0000 |
65 | +++ modules/w3c/xpath_functions.xq 2012-05-02 06:32:20 +0000 |
66 | @@ -522,6 +522,12 @@ |
67 | declare function fn:parse-xml( $arg as xs:string?, $baseURI as xs:string) as document-node(element(*, xs:untyped)) external; |
68 | |
69 | (:~ |
70 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-parse-xml-fragment">fn:parse-xml-fragment</a> |
71 | + :) |
72 | +declare function fn:parse-xml-fragment( $arg as xs:string?) as document-node(element(*, xs:untyped)) external; |
73 | + |
74 | + |
75 | +(:~ |
76 | : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-prefix-from-QName">fn:prefix-from-QName</a> |
77 | :) |
78 | declare function fn:prefix-from-QName($arg as xs:QName?) as xs:NCName? external; |
79 | @@ -864,6 +870,11 @@ |
80 | (:~ |
81 | : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-has-children">fn:has-children</a> |
82 | :) |
83 | +declare function fn:has-children() as xs:boolean external; |
84 | + |
85 | +(:~ |
86 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-has-children">fn:has-children</a> |
87 | + :) |
88 | declare function fn:has-children($node as node()?) as xs:boolean external; |
89 | |
90 | (:~ |
91 | @@ -923,12 +934,17 @@ |
92 | |
93 | (:~ |
94 | : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-namespace-uri">fn:namespace-uri</a> |
95 | - :) |
96 | + :) |
97 | declare function fn:namespace-uri($arg as node()?) as xs:anyURI external; |
98 | |
99 | (:~ |
100 | : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-nilled">fn:nilled</a> |
101 | :) |
102 | +declare function fn:nilled() as xs:boolean external; |
103 | + |
104 | +(:~ |
105 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-nilled">fn:nilled</a> |
106 | + :) |
107 | declare function fn:nilled($arg as node()?) as xs:boolean? external; |
108 | |
109 | (:~ |
110 | |
111 | === modified file 'src/compiler/translator/translator.cpp' |
112 | --- src/compiler/translator/translator.cpp 2012-05-01 21:21:04 +0000 |
113 | +++ src/compiler/translator/translator.cpp 2012-05-02 06:32:20 +0000 |
114 | @@ -694,6 +694,10 @@ |
115 | xquery_fns_def_dot.set(FunctionConsts::FN_DATA_0); |
116 | xquery_fns_def_dot.set(FunctionConsts::FN_DOCUMENT_URI_0); |
117 | xquery_fns_def_dot.set(FunctionConsts::FN_NODE_NAME_0); |
118 | + xquery_fns_def_dot.set(FunctionConsts::FN_NILLED_0); |
119 | + xquery_fns_def_dot.set(FunctionConsts::FN_HAS_CHILDREN_0); |
120 | + xquery_fns_def_dot.set(FunctionConsts::FN_PATH_0); |
121 | + |
122 | |
123 | op_concatenate = GET_BUILTIN_FUNCTION(OP_CONCATENATE_N); |
124 | assert(op_concatenate != NULL); |
125 | |
126 | === modified file 'src/functions/pregenerated/func_accessors.cpp' |
127 | --- src/functions/pregenerated/func_accessors.cpp 2012-04-24 12:39:38 +0000 |
128 | +++ src/functions/pregenerated/func_accessors.cpp 2012-05-02 06:32:20 +0000 |
129 | @@ -50,6 +50,15 @@ |
130 | return new NodeNameIterator(sctx, loc, argv); |
131 | } |
132 | |
133 | +PlanIter_t fn_nilled_3_0::codegen( |
134 | + CompilerCB*, |
135 | + static_context* sctx, |
136 | + const QueryLoc& loc, |
137 | + std::vector<PlanIter_t>& argv, |
138 | + expr& ann) const |
139 | +{ |
140 | + return new NilledIterator(sctx, loc, argv); |
141 | +} |
142 | PlanIter_t fn_nilled::codegen( |
143 | CompilerCB*, |
144 | static_context* sctx, |
145 | @@ -138,6 +147,17 @@ |
146 | { |
147 | |
148 | |
149 | + DECL_WITH_KIND(sctx, fn_nilled_3_0, |
150 | + (createQName("http://www.w3.org/2005/xpath-functions","","nilled"), |
151 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
152 | + FunctionConsts::FN_NILLED_0); |
153 | + |
154 | + } |
155 | + |
156 | + |
157 | + { |
158 | + |
159 | + |
160 | DECL_WITH_KIND(sctx, fn_nilled, |
161 | (createQName("http://www.w3.org/2005/xpath-functions","","nilled"), |
162 | GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, |
163 | |
164 | === modified file 'src/functions/pregenerated/func_accessors.h' |
165 | --- src/functions/pregenerated/func_accessors.h 2012-04-24 12:39:38 +0000 |
166 | +++ src/functions/pregenerated/func_accessors.h 2012-05-02 06:32:20 +0000 |
167 | @@ -72,6 +72,22 @@ |
168 | |
169 | |
170 | //fn:nilled |
171 | +class fn_nilled_3_0 : public function |
172 | +{ |
173 | +public: |
174 | + fn_nilled_3_0(const signature& sig, FunctionConsts::FunctionKind kind) |
175 | + : |
176 | + function(sig, kind) |
177 | + { |
178 | +theXQueryVersion = StaticContextConsts::xquery_version_3_0; |
179 | + } |
180 | + |
181 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return true; } |
182 | + |
183 | + CODEGEN_DECL(); |
184 | +}; |
185 | + |
186 | +//fn:nilled |
187 | class fn_nilled : public function |
188 | { |
189 | public: |
190 | @@ -82,7 +98,7 @@ |
191 | |
192 | } |
193 | |
194 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
195 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return true; } |
196 | |
197 | CODEGEN_DECL(); |
198 | }; |
199 | |
200 | === modified file 'src/functions/pregenerated/func_collections.cpp' |
201 | --- src/functions/pregenerated/func_collections.cpp 2012-04-24 12:39:38 +0000 |
202 | +++ src/functions/pregenerated/func_collections.cpp 2012-05-02 06:32:20 +0000 |
203 | @@ -1,934 +1,901 @@ |
204 | -/* |
205 | - * Copyright 2006-2008 The FLWOR Foundation. |
206 | - * |
207 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
208 | - * you may not use this file except in compliance with the License. |
209 | - * You may obtain a copy of the License at |
210 | - * |
211 | - * http://www.apache.org/licenses/LICENSE-2.0 |
212 | - * |
213 | - * Unless required by applicable law or agreed to in writing, software |
214 | - * distributed under the License is distributed on an "AS IS" BASIS, |
215 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
216 | - * See the License for the specific language governing permissions and |
217 | - * limitations under the License. |
218 | - */ |
219 | - |
220 | -// ****************************************** |
221 | -// * * |
222 | -// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
223 | -// * SEE .xml FILE WITH SAME NAME * |
224 | -// * * |
225 | -// ****************************************** |
226 | - |
227 | - |
228 | -#include "stdafx.h" |
229 | -#include "runtime/collections/collections.h" |
230 | -#include "functions/func_collections.h" |
231 | - |
232 | - |
233 | -namespace zorba{ |
234 | - |
235 | - |
236 | - |
237 | -PlanIter_t fn_collection::codegen( |
238 | - CompilerCB*, |
239 | - static_context* sctx, |
240 | - const QueryLoc& loc, |
241 | - std::vector<PlanIter_t>& argv, |
242 | - expr& ann) const |
243 | -{ |
244 | - return new FnCollectionIterator(sctx, loc, argv); |
245 | -} |
246 | - |
247 | - |
248 | - |
249 | - |
250 | - |
251 | - |
252 | - |
253 | - |
254 | - |
255 | - |
256 | - |
257 | - |
258 | - |
259 | - |
260 | - |
261 | - |
262 | - |
263 | - |
264 | - |
265 | -PlanIter_t zorba_store_collections_static_dml_collection_name::codegen( |
266 | - CompilerCB*, |
267 | - static_context* sctx, |
268 | - const QueryLoc& loc, |
269 | - std::vector<PlanIter_t>& argv, |
270 | - expr& ann) const |
271 | -{ |
272 | - return new ZorbaCollectionNameIterator(sctx, loc, argv); |
273 | -} |
274 | - |
275 | - |
276 | - |
277 | -PlanIter_t zorba_store_indexes_static_ddl_is_available_index::codegen( |
278 | - CompilerCB*, |
279 | - static_context* sctx, |
280 | - const QueryLoc& loc, |
281 | - std::vector<PlanIter_t>& argv, |
282 | - expr& ann) const |
283 | -{ |
284 | - return new IsAvailableIndexIterator(sctx, loc, argv); |
285 | -} |
286 | - |
287 | -PlanIter_t zorba_store_indexes_static_ddl_available_indexes::codegen( |
288 | - CompilerCB*, |
289 | - static_context* sctx, |
290 | - const QueryLoc& loc, |
291 | - std::vector<PlanIter_t>& argv, |
292 | - expr& ann) const |
293 | -{ |
294 | - return new AvailableIndexesIterator(sctx, loc, argv); |
295 | -} |
296 | - |
297 | -PlanIter_t zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint::codegen( |
298 | - CompilerCB*, |
299 | - static_context* sctx, |
300 | - const QueryLoc& loc, |
301 | - std::vector<PlanIter_t>& argv, |
302 | - expr& ann) const |
303 | -{ |
304 | - return new IsActivatedICIterator(sctx, loc, argv); |
305 | -} |
306 | - |
307 | -PlanIter_t zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints::codegen( |
308 | - CompilerCB*, |
309 | - static_context* sctx, |
310 | - const QueryLoc& loc, |
311 | - std::vector<PlanIter_t>& argv, |
312 | - expr& ann) const |
313 | -{ |
314 | - return new ActivatedICsIterator(sctx, loc, argv); |
315 | -} |
316 | - |
317 | -PlanIter_t zorba_store_collections_static_ddl_is_declared_collection::codegen( |
318 | - CompilerCB*, |
319 | - static_context* sctx, |
320 | - const QueryLoc& loc, |
321 | - std::vector<PlanIter_t>& argv, |
322 | - expr& ann) const |
323 | -{ |
324 | - return new IsDeclaredCollectionIterator(sctx, loc, argv); |
325 | -} |
326 | - |
327 | -PlanIter_t zorba_store_collections_static_ddl_declared_collections::codegen( |
328 | - CompilerCB*, |
329 | - static_context* sctx, |
330 | - const QueryLoc& loc, |
331 | - std::vector<PlanIter_t>& argv, |
332 | - expr& ann) const |
333 | -{ |
334 | - return new DeclaredCollectionsIterator(sctx, loc, argv); |
335 | -} |
336 | - |
337 | -PlanIter_t zorba_store_indexes_static_ddl_is_declared_index::codegen( |
338 | - CompilerCB*, |
339 | - static_context* sctx, |
340 | - const QueryLoc& loc, |
341 | - std::vector<PlanIter_t>& argv, |
342 | - expr& ann) const |
343 | -{ |
344 | - return new IsDeclaredIndexIterator(sctx, loc, argv); |
345 | -} |
346 | - |
347 | -PlanIter_t zorba_store_indexes_static_ddl_declared_indexes::codegen( |
348 | - CompilerCB*, |
349 | - static_context* sctx, |
350 | - const QueryLoc& loc, |
351 | - std::vector<PlanIter_t>& argv, |
352 | - expr& ann) const |
353 | -{ |
354 | - return new DeclaredIndexesIterator(sctx, loc, argv); |
355 | -} |
356 | - |
357 | -PlanIter_t zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint::codegen( |
358 | - CompilerCB*, |
359 | - static_context* sctx, |
360 | - const QueryLoc& loc, |
361 | - std::vector<PlanIter_t>& argv, |
362 | - expr& ann) const |
363 | -{ |
364 | - return new IsDeclaredICIterator(sctx, loc, argv); |
365 | -} |
366 | - |
367 | -PlanIter_t zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints::codegen( |
368 | - CompilerCB*, |
369 | - static_context* sctx, |
370 | - const QueryLoc& loc, |
371 | - std::vector<PlanIter_t>& argv, |
372 | - expr& ann) const |
373 | -{ |
374 | - return new DeclaredICsIterator(sctx, loc, argv); |
375 | -} |
376 | - |
377 | -PlanIter_t fn_uri_collection_3_0::codegen( |
378 | - CompilerCB*, |
379 | - static_context* sctx, |
380 | - const QueryLoc& loc, |
381 | - std::vector<PlanIter_t>& argv, |
382 | - expr& ann) const |
383 | -{ |
384 | - return new FnURICollectionIterator(sctx, loc, argv); |
385 | -} |
386 | - |
387 | -void populate_context_collections(static_context* sctx) |
388 | -{ |
389 | - { |
390 | - |
391 | - |
392 | - DECL_WITH_KIND(sctx, fn_collection, |
393 | - (createQName("http://www.w3.org/2005/xpath-functions","","collection"), |
394 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
395 | - FunctionConsts::FN_COLLECTION_0); |
396 | - |
397 | - } |
398 | - |
399 | - |
400 | - { |
401 | - |
402 | - |
403 | - DECL_WITH_KIND(sctx, fn_collection, |
404 | - (createQName("http://www.w3.org/2005/xpath-functions","","collection"), |
405 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
406 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
407 | - FunctionConsts::FN_COLLECTION_1); |
408 | - |
409 | - } |
410 | - |
411 | - |
412 | - { |
413 | - |
414 | - |
415 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection, |
416 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","collection"), |
417 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
418 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
419 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_COLLECTION_1); |
420 | - |
421 | - } |
422 | - |
423 | - |
424 | - { |
425 | - |
426 | - |
427 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection, |
428 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","collection"), |
429 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
430 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
431 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_COLLECTION_1); |
432 | - |
433 | - } |
434 | - |
435 | - |
436 | - { |
437 | - |
438 | - |
439 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_index_of, |
440 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","index-of"), |
441 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
442 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
443 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INDEX_OF_1); |
444 | - |
445 | - } |
446 | - |
447 | - |
448 | - { |
449 | - |
450 | - |
451 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_index_of, |
452 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","index-of"), |
453 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
454 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
455 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INDEX_OF_1); |
456 | - |
457 | - } |
458 | - |
459 | - |
460 | - { |
461 | - |
462 | - |
463 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
464 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","create"), |
465 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
466 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
467 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_CREATE_1); |
468 | - |
469 | - } |
470 | - |
471 | - |
472 | - { |
473 | - |
474 | - |
475 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
476 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","create"), |
477 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
478 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
479 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
480 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_CREATE_2); |
481 | - |
482 | - } |
483 | - |
484 | - |
485 | - { |
486 | - |
487 | - |
488 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
489 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","create"), |
490 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
491 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
492 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_CREATE_1); |
493 | - |
494 | - } |
495 | - |
496 | - |
497 | - { |
498 | - |
499 | - |
500 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
501 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","create"), |
502 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
503 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
504 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
505 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_CREATE_2); |
506 | - |
507 | - } |
508 | - |
509 | - |
510 | - { |
511 | - |
512 | - |
513 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_delete, |
514 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","delete"), |
515 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
516 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
517 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_DELETE_1); |
518 | - |
519 | - } |
520 | - |
521 | - |
522 | - { |
523 | - |
524 | - |
525 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_delete, |
526 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","delete"), |
527 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
528 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
529 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_DELETE_1); |
530 | - |
531 | - } |
532 | - |
533 | - |
534 | - { |
535 | - |
536 | - |
537 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes, |
538 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes"), |
539 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
540 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
541 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
542 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_2); |
543 | - |
544 | - } |
545 | - |
546 | - |
547 | - { |
548 | - |
549 | - |
550 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_first, |
551 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-first"), |
552 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
553 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
554 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
555 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_FIRST_2); |
556 | - |
557 | - } |
558 | - |
559 | - |
560 | - { |
561 | - |
562 | - |
563 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_first, |
564 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-first"), |
565 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
566 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
567 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
568 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_FIRST_2); |
569 | - |
570 | - } |
571 | - |
572 | - |
573 | - { |
574 | - |
575 | - |
576 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_last, |
577 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-last"), |
578 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
579 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
580 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
581 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_LAST_2); |
582 | - |
583 | - } |
584 | - |
585 | - |
586 | - { |
587 | - |
588 | - |
589 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_last, |
590 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-last"), |
591 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
592 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
593 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
594 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_LAST_2); |
595 | - |
596 | - } |
597 | - |
598 | - |
599 | - { |
600 | - |
601 | - |
602 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_before, |
603 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-before"), |
604 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
605 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
606 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
607 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
608 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_BEFORE_3); |
609 | - |
610 | - } |
611 | - |
612 | - |
613 | - { |
614 | - |
615 | - |
616 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_before, |
617 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-before"), |
618 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
619 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
620 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
621 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
622 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_BEFORE_3); |
623 | - |
624 | - } |
625 | - |
626 | - |
627 | - { |
628 | - |
629 | - |
630 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_after, |
631 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-after"), |
632 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
633 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
634 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
635 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
636 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_AFTER_3); |
637 | - |
638 | - } |
639 | - |
640 | - |
641 | - { |
642 | - |
643 | - |
644 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_after, |
645 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-after"), |
646 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
647 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
648 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
649 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
650 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_AFTER_3); |
651 | - |
652 | - } |
653 | - |
654 | - |
655 | - { |
656 | - |
657 | - |
658 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes, |
659 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes"), |
660 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
661 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
662 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
663 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_2); |
664 | - |
665 | - } |
666 | - |
667 | - |
668 | - { |
669 | - |
670 | - |
671 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_first, |
672 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-first"), |
673 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
674 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
675 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
676 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_FIRST_2); |
677 | - |
678 | - } |
679 | - |
680 | - |
681 | - { |
682 | - |
683 | - |
684 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_first, |
685 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-first"), |
686 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
687 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
688 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
689 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_FIRST_2); |
690 | - |
691 | - } |
692 | - |
693 | - |
694 | - { |
695 | - |
696 | - |
697 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_last, |
698 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-last"), |
699 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
700 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
701 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
702 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_LAST_2); |
703 | - |
704 | - } |
705 | - |
706 | - |
707 | - { |
708 | - |
709 | - |
710 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_last, |
711 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-last"), |
712 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
713 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
714 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
715 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_LAST_2); |
716 | - |
717 | - } |
718 | - |
719 | - |
720 | - { |
721 | - |
722 | - |
723 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_before, |
724 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-before"), |
725 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
726 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
727 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
728 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
729 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_BEFORE_3); |
730 | - |
731 | - } |
732 | - |
733 | - |
734 | - { |
735 | - |
736 | - |
737 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_before, |
738 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-before"), |
739 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
740 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
741 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
742 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
743 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_BEFORE_3); |
744 | - |
745 | - } |
746 | - |
747 | - |
748 | - { |
749 | - |
750 | - |
751 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_after, |
752 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-after"), |
753 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
754 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
755 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
756 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
757 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_AFTER_3); |
758 | - |
759 | - } |
760 | - |
761 | - |
762 | - { |
763 | - |
764 | - |
765 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_after, |
766 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-after"), |
767 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
768 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
769 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
770 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
771 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_AFTER_3); |
772 | - |
773 | - } |
774 | - |
775 | - |
776 | - { |
777 | - |
778 | - |
779 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_nodes, |
780 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-nodes"), |
781 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
782 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
783 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODES_1); |
784 | - |
785 | - } |
786 | - |
787 | - |
788 | - { |
789 | - |
790 | - |
791 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_nodes, |
792 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-nodes"), |
793 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
794 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
795 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODES_1); |
796 | - |
797 | - } |
798 | - |
799 | - |
800 | - { |
801 | - |
802 | - |
803 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
804 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-node-first"), |
805 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
806 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
807 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODE_FIRST_1); |
808 | - |
809 | - } |
810 | - |
811 | - |
812 | - { |
813 | - |
814 | - |
815 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
816 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-nodes-first"), |
817 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
818 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
819 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
820 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODES_FIRST_2); |
821 | - |
822 | - } |
823 | - |
824 | - |
825 | - { |
826 | - |
827 | - |
828 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
829 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-node-first"), |
830 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
831 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
832 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODE_FIRST_1); |
833 | - |
834 | - } |
835 | - |
836 | - |
837 | - { |
838 | - |
839 | - |
840 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
841 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-nodes-first"), |
842 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
843 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
844 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
845 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODES_FIRST_2); |
846 | - |
847 | - } |
848 | - |
849 | - |
850 | - { |
851 | - |
852 | - |
853 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
854 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-node-last"), |
855 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
856 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
857 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODE_LAST_1); |
858 | - |
859 | - } |
860 | - |
861 | - |
862 | - { |
863 | - |
864 | - |
865 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
866 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-nodes-last"), |
867 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
868 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
869 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
870 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODES_LAST_2); |
871 | - |
872 | - } |
873 | - |
874 | - |
875 | - { |
876 | - |
877 | - |
878 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
879 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-node-last"), |
880 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
881 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
882 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODE_LAST_1); |
883 | - |
884 | - } |
885 | - |
886 | - |
887 | - { |
888 | - |
889 | - |
890 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
891 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-nodes-last"), |
892 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
893 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
894 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
895 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODES_LAST_2); |
896 | - |
897 | - } |
898 | - |
899 | - |
900 | - { |
901 | - |
902 | - |
903 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_truncate, |
904 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","truncate"), |
905 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
906 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
907 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_TRUNCATE_1); |
908 | - |
909 | - } |
910 | - |
911 | - |
912 | - { |
913 | - |
914 | - |
915 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_truncate, |
916 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","truncate"), |
917 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
918 | - GENV_TYPESYSTEM.EMPTY_TYPE), |
919 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_TRUNCATE_1); |
920 | - |
921 | - } |
922 | - |
923 | - |
924 | - { |
925 | - |
926 | - |
927 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection_name, |
928 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","collection-name"), |
929 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
930 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE), |
931 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_COLLECTION_NAME_1); |
932 | - |
933 | - } |
934 | - |
935 | - |
936 | - { |
937 | - |
938 | - |
939 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection_name, |
940 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","collection-name"), |
941 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
942 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE), |
943 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_COLLECTION_NAME_1); |
944 | - |
945 | - } |
946 | - |
947 | - |
948 | - { |
949 | - |
950 | - |
951 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_is_available_collection, |
952 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","is-available-collection"), |
953 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
954 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
955 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_IS_AVAILABLE_COLLECTION_1); |
956 | - |
957 | - } |
958 | - |
959 | - |
960 | - { |
961 | - |
962 | - |
963 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_is_available_collection, |
964 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","is-available-collection"), |
965 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
966 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
967 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_IS_AVAILABLE_COLLECTION_1); |
968 | - |
969 | - } |
970 | - |
971 | - |
972 | - { |
973 | - |
974 | - |
975 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_available_collections, |
976 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","available-collections"), |
977 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
978 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_AVAILABLE_COLLECTIONS_0); |
979 | - |
980 | - } |
981 | - |
982 | - |
983 | - { |
984 | - |
985 | - |
986 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_available_collections, |
987 | - (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","available-collections"), |
988 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
989 | - FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_AVAILABLE_COLLECTIONS_0); |
990 | - |
991 | - } |
992 | - |
993 | - |
994 | - { |
995 | - |
996 | - |
997 | - DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_is_available_index, |
998 | - (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","is-available-index"), |
999 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1000 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1001 | - FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_IS_AVAILABLE_INDEX_1); |
1002 | - |
1003 | - } |
1004 | - |
1005 | - |
1006 | - { |
1007 | - |
1008 | - |
1009 | - DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_available_indexes, |
1010 | - (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","available-indexes"), |
1011 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1012 | - FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_AVAILABLE_INDEXES_0); |
1013 | - |
1014 | - } |
1015 | - |
1016 | - |
1017 | - { |
1018 | - |
1019 | - |
1020 | - DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint, |
1021 | - (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","is-activated-integrity-constraint"), |
1022 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1023 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1024 | - FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_ACTIVATED_INTEGRITY_CONSTRAINT_1); |
1025 | - |
1026 | - } |
1027 | - |
1028 | - |
1029 | - { |
1030 | - |
1031 | - |
1032 | - DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints, |
1033 | - (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","activated-integrity-constraints"), |
1034 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1035 | - FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_ACTIVATED_INTEGRITY_CONSTRAINTS_0); |
1036 | - |
1037 | - } |
1038 | - |
1039 | - |
1040 | - { |
1041 | - |
1042 | - |
1043 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_is_declared_collection, |
1044 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","is-declared-collection"), |
1045 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1046 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1047 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_IS_DECLARED_COLLECTION_1); |
1048 | - |
1049 | - } |
1050 | - |
1051 | - |
1052 | - { |
1053 | - |
1054 | - |
1055 | - DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_declared_collections, |
1056 | - (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","declared-collections"), |
1057 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1058 | - FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_DECLARED_COLLECTIONS_0); |
1059 | - |
1060 | - } |
1061 | - |
1062 | - |
1063 | - { |
1064 | - |
1065 | - |
1066 | - DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_is_declared_index, |
1067 | - (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","is-declared-index"), |
1068 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1069 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1070 | - FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_IS_DECLARED_INDEX_1); |
1071 | - |
1072 | - } |
1073 | - |
1074 | - |
1075 | - { |
1076 | - |
1077 | - |
1078 | - DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_declared_indexes, |
1079 | - (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","declared-indexes"), |
1080 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1081 | - FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_DECLARED_INDEXES_0); |
1082 | - |
1083 | - } |
1084 | - |
1085 | - |
1086 | - { |
1087 | - |
1088 | - |
1089 | - DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint, |
1090 | - (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","is-declared-integrity-constraint"), |
1091 | - GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1092 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1093 | - FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_DECLARED_INTEGRITY_CONSTRAINT_1); |
1094 | - |
1095 | - } |
1096 | - |
1097 | - |
1098 | - { |
1099 | - |
1100 | - |
1101 | - DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints, |
1102 | - (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","declared-integrity-constraints"), |
1103 | - GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1104 | - FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DECLARED_INTEGRITY_CONSTRAINTS_0); |
1105 | - |
1106 | - } |
1107 | - |
1108 | - |
1109 | - { |
1110 | - |
1111 | - |
1112 | - DECL_WITH_KIND(sctx, fn_uri_collection_3_0, |
1113 | - (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection"), |
1114 | - GENV_TYPESYSTEM.ANY_URI_TYPE_STAR), |
1115 | - FunctionConsts::FN_URI_COLLECTION_0); |
1116 | - |
1117 | - } |
1118 | - |
1119 | - |
1120 | - { |
1121 | - |
1122 | - |
1123 | - DECL_WITH_KIND(sctx, fn_uri_collection_3_0, |
1124 | - (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection"), |
1125 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
1126 | - GENV_TYPESYSTEM.ANY_URI_TYPE_STAR), |
1127 | - FunctionConsts::FN_URI_COLLECTION_1); |
1128 | - |
1129 | - } |
1130 | - |
1131 | -} |
1132 | - |
1133 | - |
1134 | -} |
1135 | - |
1136 | - |
1137 | - |
1138 | +/* |
1139 | + * Copyright 2006-2008 The FLWOR Foundation. |
1140 | + * |
1141 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
1142 | + * you may not use this file except in compliance with the License. |
1143 | + * You may obtain a copy of the License at |
1144 | + * |
1145 | + * http://www.apache.org/licenses/LICENSE-2.0 |
1146 | + * |
1147 | + * Unless required by applicable law or agreed to in writing, software |
1148 | + * distributed under the License is distributed on an "AS IS" BASIS, |
1149 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
1150 | + * See the License for the specific language governing permissions and |
1151 | + * limitations under the License. |
1152 | + */ |
1153 | + |
1154 | +// ****************************************** |
1155 | +// * * |
1156 | +// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
1157 | +// * SEE .xml FILE WITH SAME NAME * |
1158 | +// * * |
1159 | +// ****************************************** |
1160 | + |
1161 | + |
1162 | +#include "stdafx.h" |
1163 | +#include "runtime/collections/collections.h" |
1164 | +#include "functions/func_collections.h" |
1165 | + |
1166 | + |
1167 | +namespace zorba{ |
1168 | + |
1169 | + |
1170 | + |
1171 | +PlanIter_t fn_collection::codegen( |
1172 | + CompilerCB*, |
1173 | + static_context* sctx, |
1174 | + const QueryLoc& loc, |
1175 | + std::vector<PlanIter_t>& argv, |
1176 | + expr& ann) const |
1177 | +{ |
1178 | + return new FnCollectionIterator(sctx, loc, argv); |
1179 | +} |
1180 | + |
1181 | + |
1182 | + |
1183 | + |
1184 | + |
1185 | + |
1186 | + |
1187 | + |
1188 | + |
1189 | + |
1190 | + |
1191 | + |
1192 | + |
1193 | + |
1194 | + |
1195 | + |
1196 | + |
1197 | + |
1198 | + |
1199 | +PlanIter_t zorba_store_collections_static_dml_collection_name::codegen( |
1200 | + CompilerCB*, |
1201 | + static_context* sctx, |
1202 | + const QueryLoc& loc, |
1203 | + std::vector<PlanIter_t>& argv, |
1204 | + expr& ann) const |
1205 | +{ |
1206 | + return new ZorbaCollectionNameIterator(sctx, loc, argv); |
1207 | +} |
1208 | + |
1209 | + |
1210 | + |
1211 | +PlanIter_t zorba_store_indexes_static_ddl_is_available_index::codegen( |
1212 | + CompilerCB*, |
1213 | + static_context* sctx, |
1214 | + const QueryLoc& loc, |
1215 | + std::vector<PlanIter_t>& argv, |
1216 | + expr& ann) const |
1217 | +{ |
1218 | + return new IsAvailableIndexIterator(sctx, loc, argv); |
1219 | +} |
1220 | + |
1221 | +PlanIter_t zorba_store_indexes_static_ddl_available_indexes::codegen( |
1222 | + CompilerCB*, |
1223 | + static_context* sctx, |
1224 | + const QueryLoc& loc, |
1225 | + std::vector<PlanIter_t>& argv, |
1226 | + expr& ann) const |
1227 | +{ |
1228 | + return new AvailableIndexesIterator(sctx, loc, argv); |
1229 | +} |
1230 | + |
1231 | +PlanIter_t zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint::codegen( |
1232 | + CompilerCB*, |
1233 | + static_context* sctx, |
1234 | + const QueryLoc& loc, |
1235 | + std::vector<PlanIter_t>& argv, |
1236 | + expr& ann) const |
1237 | +{ |
1238 | + return new IsActivatedICIterator(sctx, loc, argv); |
1239 | +} |
1240 | + |
1241 | +PlanIter_t zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints::codegen( |
1242 | + CompilerCB*, |
1243 | + static_context* sctx, |
1244 | + const QueryLoc& loc, |
1245 | + std::vector<PlanIter_t>& argv, |
1246 | + expr& ann) const |
1247 | +{ |
1248 | + return new ActivatedICsIterator(sctx, loc, argv); |
1249 | +} |
1250 | + |
1251 | +PlanIter_t zorba_store_collections_static_ddl_is_declared_collection::codegen( |
1252 | + CompilerCB*, |
1253 | + static_context* sctx, |
1254 | + const QueryLoc& loc, |
1255 | + std::vector<PlanIter_t>& argv, |
1256 | + expr& ann) const |
1257 | +{ |
1258 | + return new IsDeclaredCollectionIterator(sctx, loc, argv); |
1259 | +} |
1260 | + |
1261 | +PlanIter_t zorba_store_collections_static_ddl_declared_collections::codegen( |
1262 | + CompilerCB*, |
1263 | + static_context* sctx, |
1264 | + const QueryLoc& loc, |
1265 | + std::vector<PlanIter_t>& argv, |
1266 | + expr& ann) const |
1267 | +{ |
1268 | + return new DeclaredCollectionsIterator(sctx, loc, argv); |
1269 | +} |
1270 | + |
1271 | +PlanIter_t zorba_store_indexes_static_ddl_is_declared_index::codegen( |
1272 | + CompilerCB*, |
1273 | + static_context* sctx, |
1274 | + const QueryLoc& loc, |
1275 | + std::vector<PlanIter_t>& argv, |
1276 | + expr& ann) const |
1277 | +{ |
1278 | + return new IsDeclaredIndexIterator(sctx, loc, argv); |
1279 | +} |
1280 | + |
1281 | +PlanIter_t zorba_store_indexes_static_ddl_declared_indexes::codegen( |
1282 | + CompilerCB*, |
1283 | + static_context* sctx, |
1284 | + const QueryLoc& loc, |
1285 | + std::vector<PlanIter_t>& argv, |
1286 | + expr& ann) const |
1287 | +{ |
1288 | + return new DeclaredIndexesIterator(sctx, loc, argv); |
1289 | +} |
1290 | + |
1291 | +PlanIter_t zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint::codegen( |
1292 | + CompilerCB*, |
1293 | + static_context* sctx, |
1294 | + const QueryLoc& loc, |
1295 | + std::vector<PlanIter_t>& argv, |
1296 | + expr& ann) const |
1297 | +{ |
1298 | + return new IsDeclaredICIterator(sctx, loc, argv); |
1299 | +} |
1300 | + |
1301 | +PlanIter_t zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints::codegen( |
1302 | + CompilerCB*, |
1303 | + static_context* sctx, |
1304 | + const QueryLoc& loc, |
1305 | + std::vector<PlanIter_t>& argv, |
1306 | + expr& ann) const |
1307 | +{ |
1308 | + return new DeclaredICsIterator(sctx, loc, argv); |
1309 | +} |
1310 | + |
1311 | +void populate_context_collections(static_context* sctx) |
1312 | +{ |
1313 | + { |
1314 | + |
1315 | + |
1316 | + DECL_WITH_KIND(sctx, fn_collection, |
1317 | + (createQName("http://www.w3.org/2005/xpath-functions","","collection"), |
1318 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1319 | + FunctionConsts::FN_COLLECTION_0); |
1320 | + |
1321 | + } |
1322 | + |
1323 | + |
1324 | + { |
1325 | + |
1326 | + |
1327 | + DECL_WITH_KIND(sctx, fn_collection, |
1328 | + (createQName("http://www.w3.org/2005/xpath-functions","","collection"), |
1329 | + GENV_TYPESYSTEM.STRING_TYPE_ONE, |
1330 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1331 | + FunctionConsts::FN_COLLECTION_1); |
1332 | + |
1333 | + } |
1334 | + |
1335 | + |
1336 | + { |
1337 | + |
1338 | + |
1339 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection, |
1340 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","collection"), |
1341 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1342 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1343 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_COLLECTION_1); |
1344 | + |
1345 | + } |
1346 | + |
1347 | + |
1348 | + { |
1349 | + |
1350 | + |
1351 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection, |
1352 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","collection"), |
1353 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1354 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1355 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_COLLECTION_1); |
1356 | + |
1357 | + } |
1358 | + |
1359 | + |
1360 | + { |
1361 | + |
1362 | + |
1363 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_index_of, |
1364 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","index-of"), |
1365 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1366 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
1367 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INDEX_OF_1); |
1368 | + |
1369 | + } |
1370 | + |
1371 | + |
1372 | + { |
1373 | + |
1374 | + |
1375 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_index_of, |
1376 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","index-of"), |
1377 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1378 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
1379 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INDEX_OF_1); |
1380 | + |
1381 | + } |
1382 | + |
1383 | + |
1384 | + { |
1385 | + |
1386 | + |
1387 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
1388 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","create"), |
1389 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1390 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1391 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_CREATE_1); |
1392 | + |
1393 | + } |
1394 | + |
1395 | + |
1396 | + { |
1397 | + |
1398 | + |
1399 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
1400 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","create"), |
1401 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1402 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1403 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1404 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_CREATE_2); |
1405 | + |
1406 | + } |
1407 | + |
1408 | + |
1409 | + { |
1410 | + |
1411 | + |
1412 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
1413 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","create"), |
1414 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1415 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1416 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_CREATE_1); |
1417 | + |
1418 | + } |
1419 | + |
1420 | + |
1421 | + { |
1422 | + |
1423 | + |
1424 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_create, |
1425 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","create"), |
1426 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1427 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1428 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1429 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_CREATE_2); |
1430 | + |
1431 | + } |
1432 | + |
1433 | + |
1434 | + { |
1435 | + |
1436 | + |
1437 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_delete, |
1438 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","delete"), |
1439 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1440 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1441 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_DELETE_1); |
1442 | + |
1443 | + } |
1444 | + |
1445 | + |
1446 | + { |
1447 | + |
1448 | + |
1449 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_delete, |
1450 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","delete"), |
1451 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1452 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1453 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_DELETE_1); |
1454 | + |
1455 | + } |
1456 | + |
1457 | + |
1458 | + { |
1459 | + |
1460 | + |
1461 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes, |
1462 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes"), |
1463 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1464 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1465 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1466 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_2); |
1467 | + |
1468 | + } |
1469 | + |
1470 | + |
1471 | + { |
1472 | + |
1473 | + |
1474 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_first, |
1475 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-first"), |
1476 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1477 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1478 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1479 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_FIRST_2); |
1480 | + |
1481 | + } |
1482 | + |
1483 | + |
1484 | + { |
1485 | + |
1486 | + |
1487 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_first, |
1488 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-first"), |
1489 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1490 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1491 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1492 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_FIRST_2); |
1493 | + |
1494 | + } |
1495 | + |
1496 | + |
1497 | + { |
1498 | + |
1499 | + |
1500 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_last, |
1501 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-last"), |
1502 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1503 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1504 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1505 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_LAST_2); |
1506 | + |
1507 | + } |
1508 | + |
1509 | + |
1510 | + { |
1511 | + |
1512 | + |
1513 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_last, |
1514 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-last"), |
1515 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1516 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1517 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1518 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_LAST_2); |
1519 | + |
1520 | + } |
1521 | + |
1522 | + |
1523 | + { |
1524 | + |
1525 | + |
1526 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_before, |
1527 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-before"), |
1528 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1529 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1530 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1531 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1532 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_BEFORE_3); |
1533 | + |
1534 | + } |
1535 | + |
1536 | + |
1537 | + { |
1538 | + |
1539 | + |
1540 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_before, |
1541 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-before"), |
1542 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1543 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1544 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1545 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1546 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_BEFORE_3); |
1547 | + |
1548 | + } |
1549 | + |
1550 | + |
1551 | + { |
1552 | + |
1553 | + |
1554 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_after, |
1555 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","insert-nodes-after"), |
1556 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1557 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1558 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1559 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1560 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_INSERT_NODES_AFTER_3); |
1561 | + |
1562 | + } |
1563 | + |
1564 | + |
1565 | + { |
1566 | + |
1567 | + |
1568 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_insert_nodes_after, |
1569 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","insert-nodes-after"), |
1570 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1571 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1572 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1573 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1574 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_INSERT_NODES_AFTER_3); |
1575 | + |
1576 | + } |
1577 | + |
1578 | + |
1579 | + { |
1580 | + |
1581 | + |
1582 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes, |
1583 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes"), |
1584 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1585 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1586 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1587 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_2); |
1588 | + |
1589 | + } |
1590 | + |
1591 | + |
1592 | + { |
1593 | + |
1594 | + |
1595 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_first, |
1596 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-first"), |
1597 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1598 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1599 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1600 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_FIRST_2); |
1601 | + |
1602 | + } |
1603 | + |
1604 | + |
1605 | + { |
1606 | + |
1607 | + |
1608 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_first, |
1609 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-first"), |
1610 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1611 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1612 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1613 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_FIRST_2); |
1614 | + |
1615 | + } |
1616 | + |
1617 | + |
1618 | + { |
1619 | + |
1620 | + |
1621 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_last, |
1622 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-last"), |
1623 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1624 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1625 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1626 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_LAST_2); |
1627 | + |
1628 | + } |
1629 | + |
1630 | + |
1631 | + { |
1632 | + |
1633 | + |
1634 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_last, |
1635 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-last"), |
1636 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1637 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1638 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1639 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_LAST_2); |
1640 | + |
1641 | + } |
1642 | + |
1643 | + |
1644 | + { |
1645 | + |
1646 | + |
1647 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_before, |
1648 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-before"), |
1649 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1650 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1651 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1652 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1653 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_BEFORE_3); |
1654 | + |
1655 | + } |
1656 | + |
1657 | + |
1658 | + { |
1659 | + |
1660 | + |
1661 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_before, |
1662 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-before"), |
1663 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1664 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1665 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1666 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1667 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_BEFORE_3); |
1668 | + |
1669 | + } |
1670 | + |
1671 | + |
1672 | + { |
1673 | + |
1674 | + |
1675 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_after, |
1676 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","apply-insert-nodes-after"), |
1677 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1678 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1679 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1680 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1681 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_APPLY_INSERT_NODES_AFTER_3); |
1682 | + |
1683 | + } |
1684 | + |
1685 | + |
1686 | + { |
1687 | + |
1688 | + |
1689 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_apply_insert_nodes_after, |
1690 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","apply-insert-nodes-after"), |
1691 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1692 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1693 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1694 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
1695 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_APPLY_INSERT_NODES_AFTER_3); |
1696 | + |
1697 | + } |
1698 | + |
1699 | + |
1700 | + { |
1701 | + |
1702 | + |
1703 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_nodes, |
1704 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-nodes"), |
1705 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1706 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1707 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODES_1); |
1708 | + |
1709 | + } |
1710 | + |
1711 | + |
1712 | + { |
1713 | + |
1714 | + |
1715 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_nodes, |
1716 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-nodes"), |
1717 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, |
1718 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1719 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODES_1); |
1720 | + |
1721 | + } |
1722 | + |
1723 | + |
1724 | + { |
1725 | + |
1726 | + |
1727 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
1728 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-node-first"), |
1729 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1730 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1731 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODE_FIRST_1); |
1732 | + |
1733 | + } |
1734 | + |
1735 | + |
1736 | + { |
1737 | + |
1738 | + |
1739 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
1740 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-nodes-first"), |
1741 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1742 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
1743 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1744 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODES_FIRST_2); |
1745 | + |
1746 | + } |
1747 | + |
1748 | + |
1749 | + { |
1750 | + |
1751 | + |
1752 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
1753 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-node-first"), |
1754 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1755 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1756 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODE_FIRST_1); |
1757 | + |
1758 | + } |
1759 | + |
1760 | + |
1761 | + { |
1762 | + |
1763 | + |
1764 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_first, |
1765 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-nodes-first"), |
1766 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1767 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
1768 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1769 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODES_FIRST_2); |
1770 | + |
1771 | + } |
1772 | + |
1773 | + |
1774 | + { |
1775 | + |
1776 | + |
1777 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
1778 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-node-last"), |
1779 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1780 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1781 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODE_LAST_1); |
1782 | + |
1783 | + } |
1784 | + |
1785 | + |
1786 | + { |
1787 | + |
1788 | + |
1789 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
1790 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","delete-nodes-last"), |
1791 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1792 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
1793 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1794 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_DELETE_NODES_LAST_2); |
1795 | + |
1796 | + } |
1797 | + |
1798 | + |
1799 | + { |
1800 | + |
1801 | + |
1802 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
1803 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-node-last"), |
1804 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1805 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1806 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODE_LAST_1); |
1807 | + |
1808 | + } |
1809 | + |
1810 | + |
1811 | + { |
1812 | + |
1813 | + |
1814 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_delete_node_last, |
1815 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","delete-nodes-last"), |
1816 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1817 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
1818 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1819 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_DELETE_NODES_LAST_2); |
1820 | + |
1821 | + } |
1822 | + |
1823 | + |
1824 | + { |
1825 | + |
1826 | + |
1827 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_truncate, |
1828 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","truncate"), |
1829 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1830 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1831 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_TRUNCATE_1); |
1832 | + |
1833 | + } |
1834 | + |
1835 | + |
1836 | + { |
1837 | + |
1838 | + |
1839 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_truncate, |
1840 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","truncate"), |
1841 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1842 | + GENV_TYPESYSTEM.EMPTY_TYPE), |
1843 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_TRUNCATE_1); |
1844 | + |
1845 | + } |
1846 | + |
1847 | + |
1848 | + { |
1849 | + |
1850 | + |
1851 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection_name, |
1852 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/dml","","collection-name"), |
1853 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1854 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE), |
1855 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DML_COLLECTION_NAME_1); |
1856 | + |
1857 | + } |
1858 | + |
1859 | + |
1860 | + { |
1861 | + |
1862 | + |
1863 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_dml_collection_name, |
1864 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/dml","","collection-name"), |
1865 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
1866 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE), |
1867 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_COLLECTION_NAME_1); |
1868 | + |
1869 | + } |
1870 | + |
1871 | + |
1872 | + { |
1873 | + |
1874 | + |
1875 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_is_available_collection, |
1876 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","is-available-collection"), |
1877 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1878 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1879 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_IS_AVAILABLE_COLLECTION_1); |
1880 | + |
1881 | + } |
1882 | + |
1883 | + |
1884 | + { |
1885 | + |
1886 | + |
1887 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_is_available_collection, |
1888 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","is-available-collection"), |
1889 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1890 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1891 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_IS_AVAILABLE_COLLECTION_1); |
1892 | + |
1893 | + } |
1894 | + |
1895 | + |
1896 | + { |
1897 | + |
1898 | + |
1899 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_available_collections, |
1900 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","available-collections"), |
1901 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1902 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_AVAILABLE_COLLECTIONS_0); |
1903 | + |
1904 | + } |
1905 | + |
1906 | + |
1907 | + { |
1908 | + |
1909 | + |
1910 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_available_collections, |
1911 | + (createQName("http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl","","available-collections"), |
1912 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1913 | + FunctionConsts::ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_AVAILABLE_COLLECTIONS_0); |
1914 | + |
1915 | + } |
1916 | + |
1917 | + |
1918 | + { |
1919 | + |
1920 | + |
1921 | + DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_is_available_index, |
1922 | + (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","is-available-index"), |
1923 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1924 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1925 | + FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_IS_AVAILABLE_INDEX_1); |
1926 | + |
1927 | + } |
1928 | + |
1929 | + |
1930 | + { |
1931 | + |
1932 | + |
1933 | + DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_available_indexes, |
1934 | + (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","available-indexes"), |
1935 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1936 | + FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_AVAILABLE_INDEXES_0); |
1937 | + |
1938 | + } |
1939 | + |
1940 | + |
1941 | + { |
1942 | + |
1943 | + |
1944 | + DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint, |
1945 | + (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","is-activated-integrity-constraint"), |
1946 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1947 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1948 | + FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_ACTIVATED_INTEGRITY_CONSTRAINT_1); |
1949 | + |
1950 | + } |
1951 | + |
1952 | + |
1953 | + { |
1954 | + |
1955 | + |
1956 | + DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints, |
1957 | + (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","activated-integrity-constraints"), |
1958 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1959 | + FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_ACTIVATED_INTEGRITY_CONSTRAINTS_0); |
1960 | + |
1961 | + } |
1962 | + |
1963 | + |
1964 | + { |
1965 | + |
1966 | + |
1967 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_is_declared_collection, |
1968 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","is-declared-collection"), |
1969 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1970 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1971 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_IS_DECLARED_COLLECTION_1); |
1972 | + |
1973 | + } |
1974 | + |
1975 | + |
1976 | + { |
1977 | + |
1978 | + |
1979 | + DECL_WITH_KIND(sctx, zorba_store_collections_static_ddl_declared_collections, |
1980 | + (createQName("http://www.zorba-xquery.com/modules/store/static/collections/ddl","","declared-collections"), |
1981 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
1982 | + FunctionConsts::ZORBA_STORE_COLLECTIONS_STATIC_DDL_DECLARED_COLLECTIONS_0); |
1983 | + |
1984 | + } |
1985 | + |
1986 | + |
1987 | + { |
1988 | + |
1989 | + |
1990 | + DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_is_declared_index, |
1991 | + (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","is-declared-index"), |
1992 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
1993 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
1994 | + FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_IS_DECLARED_INDEX_1); |
1995 | + |
1996 | + } |
1997 | + |
1998 | + |
1999 | + { |
2000 | + |
2001 | + |
2002 | + DECL_WITH_KIND(sctx, zorba_store_indexes_static_ddl_declared_indexes, |
2003 | + (createQName("http://www.zorba-xquery.com/modules/store/static/indexes/ddl","","declared-indexes"), |
2004 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
2005 | + FunctionConsts::ZORBA_STORE_INDEXES_STATIC_DDL_DECLARED_INDEXES_0); |
2006 | + |
2007 | + } |
2008 | + |
2009 | + |
2010 | + { |
2011 | + |
2012 | + |
2013 | + DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint, |
2014 | + (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","is-declared-integrity-constraint"), |
2015 | + GENV_TYPESYSTEM.QNAME_TYPE_ONE, |
2016 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
2017 | + FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_DECLARED_INTEGRITY_CONSTRAINT_1); |
2018 | + |
2019 | + } |
2020 | + |
2021 | + |
2022 | + { |
2023 | + |
2024 | + |
2025 | + DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints, |
2026 | + (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","declared-integrity-constraints"), |
2027 | + GENV_TYPESYSTEM.QNAME_TYPE_STAR), |
2028 | + FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DECLARED_INTEGRITY_CONSTRAINTS_0); |
2029 | + |
2030 | + } |
2031 | + |
2032 | +} |
2033 | + |
2034 | + |
2035 | +} |
2036 | + |
2037 | + |
2038 | + |
2039 | |
2040 | === modified file 'src/functions/pregenerated/func_collections.h' |
2041 | --- src/functions/pregenerated/func_collections.h 2012-04-24 12:39:38 +0000 |
2042 | +++ src/functions/pregenerated/func_collections.h 2012-05-02 06:32:20 +0000 |
2043 | @@ -1,690 +1,675 @@ |
2044 | -/* |
2045 | - * Copyright 2006-2008 The FLWOR Foundation. |
2046 | - * |
2047 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
2048 | - * you may not use this file except in compliance with the License. |
2049 | - * You may obtain a copy of the License at |
2050 | - * |
2051 | - * http://www.apache.org/licenses/LICENSE-2.0 |
2052 | - * |
2053 | - * Unless required by applicable law or agreed to in writing, software |
2054 | - * distributed under the License is distributed on an "AS IS" BASIS, |
2055 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
2056 | - * See the License for the specific language governing permissions and |
2057 | - * limitations under the License. |
2058 | - */ |
2059 | - |
2060 | -// ****************************************** |
2061 | -// * * |
2062 | -// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
2063 | -// * SEE .xml FILE WITH SAME NAME * |
2064 | -// * * |
2065 | -// ****************************************** |
2066 | - |
2067 | - |
2068 | -#ifndef ZORBA_FUNCTIONS_COLLECTIONS_H |
2069 | -#define ZORBA_FUNCTIONS_COLLECTIONS_H |
2070 | - |
2071 | - |
2072 | -#include "common/shared_types.h" |
2073 | -#include "functions/function_impl.h" |
2074 | - |
2075 | - |
2076 | -namespace zorba { |
2077 | - |
2078 | - |
2079 | -void populate_context_collections(static_context* sctx); |
2080 | - |
2081 | - |
2082 | - |
2083 | - |
2084 | -//fn:collection |
2085 | -class fn_collection : public function |
2086 | -{ |
2087 | -public: |
2088 | - fn_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
2089 | - : |
2090 | - function(sig, kind) |
2091 | - { |
2092 | - |
2093 | - } |
2094 | - |
2095 | - bool accessesDynCtx() const { return true; } |
2096 | - |
2097 | - bool isSource() const { return true; } |
2098 | - |
2099 | - CODEGEN_DECL(); |
2100 | -}; |
2101 | - |
2102 | - |
2103 | -//zorba-store-collections-static-dml:collection |
2104 | -class zorba_store_collections_static_dml_collection : public function |
2105 | -{ |
2106 | -public: |
2107 | - zorba_store_collections_static_dml_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
2108 | - : |
2109 | - function(sig, kind) |
2110 | - { |
2111 | - |
2112 | - } |
2113 | - |
2114 | - bool accessesDynCtx() const { return true; } |
2115 | - |
2116 | - bool isSource() const { return true; } |
2117 | - |
2118 | - FunctionConsts::AnnotationValue producesDistinctNodes() const |
2119 | - { |
2120 | - return FunctionConsts::YES; |
2121 | - } |
2122 | - |
2123 | - FunctionConsts::AnnotationValue producesSortedNodes() const |
2124 | - { |
2125 | - return FunctionConsts::YES; |
2126 | - } |
2127 | - |
2128 | - CODEGEN_DECL(); |
2129 | -}; |
2130 | - |
2131 | - |
2132 | -//zorba-store-collections-static-dml:index-of |
2133 | -class zorba_store_collections_static_dml_index_of : public function |
2134 | -{ |
2135 | -public: |
2136 | - zorba_store_collections_static_dml_index_of(const signature& sig, FunctionConsts::FunctionKind kind) |
2137 | - : |
2138 | - function(sig, kind) |
2139 | - { |
2140 | - |
2141 | - } |
2142 | - |
2143 | - bool accessesDynCtx() const { return true; } |
2144 | - |
2145 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
2146 | - |
2147 | - CODEGEN_DECL(); |
2148 | -}; |
2149 | - |
2150 | - |
2151 | -//zorba-store-collections-static-ddl:create |
2152 | -class zorba_store_collections_static_ddl_create : public function |
2153 | -{ |
2154 | -public: |
2155 | - zorba_store_collections_static_ddl_create(const signature& sig, FunctionConsts::FunctionKind kind) |
2156 | - : |
2157 | - function(sig, kind) |
2158 | - { |
2159 | - |
2160 | - } |
2161 | - |
2162 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2163 | - |
2164 | - bool accessesDynCtx() const { return true; } |
2165 | - |
2166 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2167 | - |
2168 | - CODEGEN_DECL(); |
2169 | -}; |
2170 | - |
2171 | - |
2172 | -//zorba-store-collections-static-ddl:delete |
2173 | -class zorba_store_collections_static_ddl_delete : public function |
2174 | -{ |
2175 | -public: |
2176 | - zorba_store_collections_static_ddl_delete(const signature& sig, FunctionConsts::FunctionKind kind) |
2177 | - : |
2178 | - function(sig, kind) |
2179 | - { |
2180 | - |
2181 | - } |
2182 | - |
2183 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2184 | - |
2185 | - bool accessesDynCtx() const { return true; } |
2186 | - |
2187 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
2188 | - |
2189 | - CODEGEN_DECL(); |
2190 | -}; |
2191 | - |
2192 | - |
2193 | -//zorba-store-collections-static-dml:insert-nodes |
2194 | -class zorba_store_collections_static_dml_insert_nodes : public function |
2195 | -{ |
2196 | -public: |
2197 | - zorba_store_collections_static_dml_insert_nodes(const signature& sig, FunctionConsts::FunctionKind kind) |
2198 | - : |
2199 | - function(sig, kind) |
2200 | - { |
2201 | - |
2202 | - } |
2203 | - |
2204 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2205 | - |
2206 | - bool accessesDynCtx() const { return true; } |
2207 | - |
2208 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2209 | - |
2210 | - CODEGEN_DECL(); |
2211 | -}; |
2212 | - |
2213 | - |
2214 | -//zorba-store-collections-static-dml:insert-nodes-first |
2215 | -class zorba_store_collections_static_dml_insert_nodes_first : public function |
2216 | -{ |
2217 | -public: |
2218 | - zorba_store_collections_static_dml_insert_nodes_first(const signature& sig, FunctionConsts::FunctionKind kind) |
2219 | - : |
2220 | - function(sig, kind) |
2221 | - { |
2222 | - |
2223 | - } |
2224 | - |
2225 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2226 | - |
2227 | - bool accessesDynCtx() const { return true; } |
2228 | - |
2229 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2230 | - |
2231 | - CODEGEN_DECL(); |
2232 | -}; |
2233 | - |
2234 | - |
2235 | -//zorba-store-collections-static-dml:insert-nodes-last |
2236 | -class zorba_store_collections_static_dml_insert_nodes_last : public function |
2237 | -{ |
2238 | -public: |
2239 | - zorba_store_collections_static_dml_insert_nodes_last(const signature& sig, FunctionConsts::FunctionKind kind) |
2240 | - : |
2241 | - function(sig, kind) |
2242 | - { |
2243 | - |
2244 | - } |
2245 | - |
2246 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2247 | - |
2248 | - bool accessesDynCtx() const { return true; } |
2249 | - |
2250 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2251 | - |
2252 | - CODEGEN_DECL(); |
2253 | -}; |
2254 | - |
2255 | - |
2256 | -//zorba-store-collections-static-dml:insert-nodes-before |
2257 | -class zorba_store_collections_static_dml_insert_nodes_before : public function |
2258 | -{ |
2259 | -public: |
2260 | - zorba_store_collections_static_dml_insert_nodes_before(const signature& sig, FunctionConsts::FunctionKind kind) |
2261 | - : |
2262 | - function(sig, kind) |
2263 | - { |
2264 | - |
2265 | - } |
2266 | - |
2267 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2268 | - |
2269 | - bool accessesDynCtx() const { return true; } |
2270 | - |
2271 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
2272 | - |
2273 | - CODEGEN_DECL(); |
2274 | -}; |
2275 | - |
2276 | - |
2277 | -//zorba-store-collections-static-dml:insert-nodes-after |
2278 | -class zorba_store_collections_static_dml_insert_nodes_after : public function |
2279 | -{ |
2280 | -public: |
2281 | - zorba_store_collections_static_dml_insert_nodes_after(const signature& sig, FunctionConsts::FunctionKind kind) |
2282 | - : |
2283 | - function(sig, kind) |
2284 | - { |
2285 | - |
2286 | - } |
2287 | - |
2288 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2289 | - |
2290 | - bool accessesDynCtx() const { return true; } |
2291 | - |
2292 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
2293 | - |
2294 | - CODEGEN_DECL(); |
2295 | -}; |
2296 | - |
2297 | - |
2298 | -//zorba-store-collections-static-dml:apply-insert-nodes |
2299 | -class zorba_store_collections_static_dml_apply_insert_nodes : public function |
2300 | -{ |
2301 | -public: |
2302 | - zorba_store_collections_static_dml_apply_insert_nodes(const signature& sig, FunctionConsts::FunctionKind kind) |
2303 | - : |
2304 | - function(sig, kind) |
2305 | - { |
2306 | - |
2307 | - } |
2308 | - |
2309 | - short getScriptingKind() const { return APPLYING_EXPR; } |
2310 | - |
2311 | - bool accessesDynCtx() const { return true; } |
2312 | - |
2313 | - bool propagatesInputNodes(expr* fo, csize producer) const; |
2314 | - |
2315 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2316 | - |
2317 | - CODEGEN_DECL(); |
2318 | -}; |
2319 | - |
2320 | - |
2321 | -//zorba-store-collections-static-dml:apply-insert-nodes-first |
2322 | -class zorba_store_collections_static_dml_apply_insert_nodes_first : public function |
2323 | -{ |
2324 | -public: |
2325 | - zorba_store_collections_static_dml_apply_insert_nodes_first(const signature& sig, FunctionConsts::FunctionKind kind) |
2326 | - : |
2327 | - function(sig, kind) |
2328 | - { |
2329 | - |
2330 | - } |
2331 | - |
2332 | - short getScriptingKind() const { return APPLYING_EXPR; } |
2333 | - |
2334 | - bool accessesDynCtx() const { return true; } |
2335 | - |
2336 | - bool propagatesInputNodes(expr* fo, csize producer) const; |
2337 | - |
2338 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2339 | - |
2340 | - CODEGEN_DECL(); |
2341 | -}; |
2342 | - |
2343 | - |
2344 | -//zorba-store-collections-static-dml:apply-insert-nodes-last |
2345 | -class zorba_store_collections_static_dml_apply_insert_nodes_last : public function |
2346 | -{ |
2347 | -public: |
2348 | - zorba_store_collections_static_dml_apply_insert_nodes_last(const signature& sig, FunctionConsts::FunctionKind kind) |
2349 | - : |
2350 | - function(sig, kind) |
2351 | - { |
2352 | - |
2353 | - } |
2354 | - |
2355 | - short getScriptingKind() const { return APPLYING_EXPR; } |
2356 | - |
2357 | - bool accessesDynCtx() const { return true; } |
2358 | - |
2359 | - bool propagatesInputNodes(expr* fo, csize producer) const; |
2360 | - |
2361 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2362 | - |
2363 | - CODEGEN_DECL(); |
2364 | -}; |
2365 | - |
2366 | - |
2367 | -//zorba-store-collections-static-dml:apply-insert-nodes-before |
2368 | -class zorba_store_collections_static_dml_apply_insert_nodes_before : public function |
2369 | -{ |
2370 | -public: |
2371 | - zorba_store_collections_static_dml_apply_insert_nodes_before(const signature& sig, FunctionConsts::FunctionKind kind) |
2372 | - : |
2373 | - function(sig, kind) |
2374 | - { |
2375 | - |
2376 | - } |
2377 | - |
2378 | - short getScriptingKind() const { return APPLYING_EXPR; } |
2379 | - |
2380 | - bool accessesDynCtx() const { return true; } |
2381 | - |
2382 | - bool propagatesInputNodes(expr* fo, csize producer) const; |
2383 | - |
2384 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
2385 | - |
2386 | - CODEGEN_DECL(); |
2387 | -}; |
2388 | - |
2389 | - |
2390 | -//zorba-store-collections-static-dml:apply-insert-nodes-after |
2391 | -class zorba_store_collections_static_dml_apply_insert_nodes_after : public function |
2392 | -{ |
2393 | -public: |
2394 | - zorba_store_collections_static_dml_apply_insert_nodes_after(const signature& sig, FunctionConsts::FunctionKind kind) |
2395 | - : |
2396 | - function(sig, kind) |
2397 | - { |
2398 | - |
2399 | - } |
2400 | - |
2401 | - short getScriptingKind() const { return APPLYING_EXPR; } |
2402 | - |
2403 | - bool accessesDynCtx() const { return true; } |
2404 | - |
2405 | - bool propagatesInputNodes(expr* fo, csize producer) const; |
2406 | - |
2407 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
2408 | - |
2409 | - CODEGEN_DECL(); |
2410 | -}; |
2411 | - |
2412 | - |
2413 | -//zorba-store-collections-static-dml:delete-nodes |
2414 | -class zorba_store_collections_static_dml_delete_nodes : public function |
2415 | -{ |
2416 | -public: |
2417 | - zorba_store_collections_static_dml_delete_nodes(const signature& sig, FunctionConsts::FunctionKind kind) |
2418 | - : |
2419 | - function(sig, kind) |
2420 | - { |
2421 | - |
2422 | - } |
2423 | - |
2424 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2425 | - |
2426 | - bool accessesDynCtx() const { return true; } |
2427 | - |
2428 | - BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const; |
2429 | - |
2430 | - BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const; |
2431 | - |
2432 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 0; } |
2433 | - |
2434 | - CODEGEN_DECL(); |
2435 | -}; |
2436 | - |
2437 | - |
2438 | -//zorba-store-collections-static-dml:delete-node-first |
2439 | -class zorba_store_collections_static_dml_delete_node_first : public function |
2440 | -{ |
2441 | -public: |
2442 | - zorba_store_collections_static_dml_delete_node_first(const signature& sig, FunctionConsts::FunctionKind kind) |
2443 | - : |
2444 | - function(sig, kind) |
2445 | - { |
2446 | - |
2447 | - } |
2448 | - |
2449 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2450 | - |
2451 | - bool accessesDynCtx() const { return true; } |
2452 | - |
2453 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
2454 | - |
2455 | - CODEGEN_DECL(); |
2456 | -}; |
2457 | - |
2458 | - |
2459 | -//zorba-store-collections-static-dml:delete-node-last |
2460 | -class zorba_store_collections_static_dml_delete_node_last : public function |
2461 | -{ |
2462 | -public: |
2463 | - zorba_store_collections_static_dml_delete_node_last(const signature& sig, FunctionConsts::FunctionKind kind) |
2464 | - : |
2465 | - function(sig, kind) |
2466 | - { |
2467 | - |
2468 | - } |
2469 | - |
2470 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2471 | - |
2472 | - bool accessesDynCtx() const { return true; } |
2473 | - |
2474 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
2475 | - |
2476 | - CODEGEN_DECL(); |
2477 | -}; |
2478 | - |
2479 | - |
2480 | -//zorba-store-collections-static-dml:truncate |
2481 | -class zorba_store_collections_static_dml_truncate : public function |
2482 | -{ |
2483 | -public: |
2484 | - zorba_store_collections_static_dml_truncate(const signature& sig, FunctionConsts::FunctionKind kind) |
2485 | - : |
2486 | - function(sig, kind) |
2487 | - { |
2488 | - |
2489 | - } |
2490 | - |
2491 | - short getScriptingKind() const { return UPDATING_EXPR; } |
2492 | - |
2493 | - bool accessesDynCtx() const { return true; } |
2494 | - |
2495 | - CODEGEN_DECL(); |
2496 | -}; |
2497 | - |
2498 | - |
2499 | -//zorba-store-collections-static-dml:collection-name |
2500 | -class zorba_store_collections_static_dml_collection_name : public function |
2501 | -{ |
2502 | -public: |
2503 | - zorba_store_collections_static_dml_collection_name(const signature& sig, FunctionConsts::FunctionKind kind) |
2504 | - : |
2505 | - function(sig, kind) |
2506 | - { |
2507 | - |
2508 | - } |
2509 | - |
2510 | - bool accessesDynCtx() const { return true; } |
2511 | - |
2512 | - bool mustCopyInputNodes(expr* fo, csize producer) const { return true; } |
2513 | - |
2514 | - CODEGEN_DECL(); |
2515 | -}; |
2516 | - |
2517 | - |
2518 | -//zorba-store-collections-static-ddl:is-available-collection |
2519 | -class zorba_store_collections_static_ddl_is_available_collection : public function |
2520 | -{ |
2521 | -public: |
2522 | - zorba_store_collections_static_ddl_is_available_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
2523 | - : |
2524 | - function(sig, kind) |
2525 | - { |
2526 | - |
2527 | - } |
2528 | - |
2529 | - bool accessesDynCtx() const { return true; } |
2530 | - |
2531 | - CODEGEN_DECL(); |
2532 | -}; |
2533 | - |
2534 | - |
2535 | -//zorba-store-collections-static-ddl:available-collections |
2536 | -class zorba_store_collections_static_ddl_available_collections : public function |
2537 | -{ |
2538 | -public: |
2539 | - zorba_store_collections_static_ddl_available_collections(const signature& sig, FunctionConsts::FunctionKind kind) |
2540 | - : |
2541 | - function(sig, kind) |
2542 | - { |
2543 | - |
2544 | - } |
2545 | - |
2546 | - bool accessesDynCtx() const { return true; } |
2547 | - |
2548 | - CODEGEN_DECL(); |
2549 | -}; |
2550 | - |
2551 | - |
2552 | -//zorba-store-indexes-static-ddl:is-available-index |
2553 | -class zorba_store_indexes_static_ddl_is_available_index : public function |
2554 | -{ |
2555 | -public: |
2556 | - zorba_store_indexes_static_ddl_is_available_index(const signature& sig, FunctionConsts::FunctionKind kind) |
2557 | - : |
2558 | - function(sig, kind) |
2559 | - { |
2560 | - |
2561 | - } |
2562 | - |
2563 | - bool accessesDynCtx() const { return true; } |
2564 | - |
2565 | - CODEGEN_DECL(); |
2566 | -}; |
2567 | - |
2568 | - |
2569 | -//zorba-store-indexes-static-ddl:available-indexes |
2570 | -class zorba_store_indexes_static_ddl_available_indexes : public function |
2571 | -{ |
2572 | -public: |
2573 | - zorba_store_indexes_static_ddl_available_indexes(const signature& sig, FunctionConsts::FunctionKind kind) |
2574 | - : |
2575 | - function(sig, kind) |
2576 | - { |
2577 | - |
2578 | - } |
2579 | - |
2580 | - bool accessesDynCtx() const { return true; } |
2581 | - |
2582 | - CODEGEN_DECL(); |
2583 | -}; |
2584 | - |
2585 | - |
2586 | -//zorba-store-integrity_constraints-static-ddl:is-activated-integrity-constraint |
2587 | -class zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint : public function |
2588 | -{ |
2589 | -public: |
2590 | - zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint(const signature& sig, FunctionConsts::FunctionKind kind) |
2591 | - : |
2592 | - function(sig, kind) |
2593 | - { |
2594 | - |
2595 | - } |
2596 | - |
2597 | - bool accessesDynCtx() const { return true; } |
2598 | - |
2599 | - CODEGEN_DECL(); |
2600 | -}; |
2601 | - |
2602 | - |
2603 | -//zorba-store-integrity_constraints-static-ddl:activated-integrity-constraints |
2604 | -class zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints : public function |
2605 | -{ |
2606 | -public: |
2607 | - zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints(const signature& sig, FunctionConsts::FunctionKind kind) |
2608 | - : |
2609 | - function(sig, kind) |
2610 | - { |
2611 | - |
2612 | - } |
2613 | - |
2614 | - bool accessesDynCtx() const { return true; } |
2615 | - |
2616 | - CODEGEN_DECL(); |
2617 | -}; |
2618 | - |
2619 | - |
2620 | -//zorba-store-collections-static-ddl:is-declared-collection |
2621 | -class zorba_store_collections_static_ddl_is_declared_collection : public function |
2622 | -{ |
2623 | -public: |
2624 | - zorba_store_collections_static_ddl_is_declared_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
2625 | - : |
2626 | - function(sig, kind) |
2627 | - { |
2628 | - |
2629 | - } |
2630 | - |
2631 | - CODEGEN_DECL(); |
2632 | -}; |
2633 | - |
2634 | - |
2635 | -//zorba-store-collections-static-ddl:declared-collections |
2636 | -class zorba_store_collections_static_ddl_declared_collections : public function |
2637 | -{ |
2638 | -public: |
2639 | - zorba_store_collections_static_ddl_declared_collections(const signature& sig, FunctionConsts::FunctionKind kind) |
2640 | - : |
2641 | - function(sig, kind) |
2642 | - { |
2643 | - |
2644 | - } |
2645 | - |
2646 | - CODEGEN_DECL(); |
2647 | -}; |
2648 | - |
2649 | - |
2650 | -//zorba-store-indexes-static-ddl:is-declared-index |
2651 | -class zorba_store_indexes_static_ddl_is_declared_index : public function |
2652 | -{ |
2653 | -public: |
2654 | - zorba_store_indexes_static_ddl_is_declared_index(const signature& sig, FunctionConsts::FunctionKind kind) |
2655 | - : |
2656 | - function(sig, kind) |
2657 | - { |
2658 | - |
2659 | - } |
2660 | - |
2661 | - CODEGEN_DECL(); |
2662 | -}; |
2663 | - |
2664 | - |
2665 | -//zorba-store-indexes-static-ddl:declared-indexes |
2666 | -class zorba_store_indexes_static_ddl_declared_indexes : public function |
2667 | -{ |
2668 | -public: |
2669 | - zorba_store_indexes_static_ddl_declared_indexes(const signature& sig, FunctionConsts::FunctionKind kind) |
2670 | - : |
2671 | - function(sig, kind) |
2672 | - { |
2673 | - |
2674 | - } |
2675 | - |
2676 | - CODEGEN_DECL(); |
2677 | -}; |
2678 | - |
2679 | - |
2680 | -//zorba-store-integrity_constraints-static-ddl:is-declared-integrity-constraint |
2681 | -class zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint : public function |
2682 | -{ |
2683 | -public: |
2684 | - zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint(const signature& sig, FunctionConsts::FunctionKind kind) |
2685 | - : |
2686 | - function(sig, kind) |
2687 | - { |
2688 | - |
2689 | - } |
2690 | - |
2691 | - CODEGEN_DECL(); |
2692 | -}; |
2693 | - |
2694 | - |
2695 | -//zorba-store-integrity_constraints-static-ddl:declared-integrity-constraints |
2696 | -class zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints : public function |
2697 | -{ |
2698 | -public: |
2699 | - zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints(const signature& sig, FunctionConsts::FunctionKind kind) |
2700 | - : |
2701 | - function(sig, kind) |
2702 | - { |
2703 | - |
2704 | - } |
2705 | - |
2706 | - CODEGEN_DECL(); |
2707 | -}; |
2708 | - |
2709 | - |
2710 | -//fn:uri-collection |
2711 | -class fn_uri_collection_3_0 : public function |
2712 | -{ |
2713 | -public: |
2714 | - fn_uri_collection_3_0(const signature& sig, FunctionConsts::FunctionKind kind) |
2715 | - : |
2716 | - function(sig, kind) |
2717 | - { |
2718 | -theXQueryVersion = StaticContextConsts::xquery_version_3_0; |
2719 | - } |
2720 | - |
2721 | - CODEGEN_DECL(); |
2722 | -}; |
2723 | - |
2724 | - |
2725 | -} //namespace zorba |
2726 | - |
2727 | - |
2728 | -#endif |
2729 | -/* |
2730 | - * Local variables: |
2731 | - * mode: c++ |
2732 | - * End: |
2733 | - */ |
2734 | +/* |
2735 | + * Copyright 2006-2008 The FLWOR Foundation. |
2736 | + * |
2737 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
2738 | + * you may not use this file except in compliance with the License. |
2739 | + * You may obtain a copy of the License at |
2740 | + * |
2741 | + * http://www.apache.org/licenses/LICENSE-2.0 |
2742 | + * |
2743 | + * Unless required by applicable law or agreed to in writing, software |
2744 | + * distributed under the License is distributed on an "AS IS" BASIS, |
2745 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
2746 | + * See the License for the specific language governing permissions and |
2747 | + * limitations under the License. |
2748 | + */ |
2749 | + |
2750 | +// ****************************************** |
2751 | +// * * |
2752 | +// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
2753 | +// * SEE .xml FILE WITH SAME NAME * |
2754 | +// * * |
2755 | +// ****************************************** |
2756 | + |
2757 | + |
2758 | +#ifndef ZORBA_FUNCTIONS_COLLECTIONS_H |
2759 | +#define ZORBA_FUNCTIONS_COLLECTIONS_H |
2760 | + |
2761 | + |
2762 | +#include "common/shared_types.h" |
2763 | +#include "functions/function_impl.h" |
2764 | + |
2765 | + |
2766 | +namespace zorba { |
2767 | + |
2768 | + |
2769 | +void populate_context_collections(static_context* sctx); |
2770 | + |
2771 | + |
2772 | + |
2773 | + |
2774 | +//fn:collection |
2775 | +class fn_collection : public function |
2776 | +{ |
2777 | +public: |
2778 | + fn_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
2779 | + : |
2780 | + function(sig, kind) |
2781 | + { |
2782 | + |
2783 | + } |
2784 | + |
2785 | + bool accessesDynCtx() const { return true; } |
2786 | + |
2787 | + bool isSource() const { return true; } |
2788 | + |
2789 | + CODEGEN_DECL(); |
2790 | +}; |
2791 | + |
2792 | + |
2793 | +//zorba-store-collections-static-dml:collection |
2794 | +class zorba_store_collections_static_dml_collection : public function |
2795 | +{ |
2796 | +public: |
2797 | + zorba_store_collections_static_dml_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
2798 | + : |
2799 | + function(sig, kind) |
2800 | + { |
2801 | + |
2802 | + } |
2803 | + |
2804 | + bool accessesDynCtx() const { return true; } |
2805 | + |
2806 | + bool isSource() const { return true; } |
2807 | + |
2808 | + FunctionConsts::AnnotationValue producesDistinctNodes() const |
2809 | + { |
2810 | + return FunctionConsts::YES; |
2811 | + } |
2812 | + |
2813 | + FunctionConsts::AnnotationValue producesSortedNodes() const |
2814 | + { |
2815 | + return FunctionConsts::YES; |
2816 | + } |
2817 | + |
2818 | + CODEGEN_DECL(); |
2819 | +}; |
2820 | + |
2821 | + |
2822 | +//zorba-store-collections-static-dml:index-of |
2823 | +class zorba_store_collections_static_dml_index_of : public function |
2824 | +{ |
2825 | +public: |
2826 | + zorba_store_collections_static_dml_index_of(const signature& sig, FunctionConsts::FunctionKind kind) |
2827 | + : |
2828 | + function(sig, kind) |
2829 | + { |
2830 | + |
2831 | + } |
2832 | + |
2833 | + bool accessesDynCtx() const { return true; } |
2834 | + |
2835 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
2836 | + |
2837 | + CODEGEN_DECL(); |
2838 | +}; |
2839 | + |
2840 | + |
2841 | +//zorba-store-collections-static-ddl:create |
2842 | +class zorba_store_collections_static_ddl_create : public function |
2843 | +{ |
2844 | +public: |
2845 | + zorba_store_collections_static_ddl_create(const signature& sig, FunctionConsts::FunctionKind kind) |
2846 | + : |
2847 | + function(sig, kind) |
2848 | + { |
2849 | + |
2850 | + } |
2851 | + |
2852 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2853 | + |
2854 | + bool accessesDynCtx() const { return true; } |
2855 | + |
2856 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2857 | + |
2858 | + CODEGEN_DECL(); |
2859 | +}; |
2860 | + |
2861 | + |
2862 | +//zorba-store-collections-static-ddl:delete |
2863 | +class zorba_store_collections_static_ddl_delete : public function |
2864 | +{ |
2865 | +public: |
2866 | + zorba_store_collections_static_ddl_delete(const signature& sig, FunctionConsts::FunctionKind kind) |
2867 | + : |
2868 | + function(sig, kind) |
2869 | + { |
2870 | + |
2871 | + } |
2872 | + |
2873 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2874 | + |
2875 | + bool accessesDynCtx() const { return true; } |
2876 | + |
2877 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
2878 | + |
2879 | + CODEGEN_DECL(); |
2880 | +}; |
2881 | + |
2882 | + |
2883 | +//zorba-store-collections-static-dml:insert-nodes |
2884 | +class zorba_store_collections_static_dml_insert_nodes : public function |
2885 | +{ |
2886 | +public: |
2887 | + zorba_store_collections_static_dml_insert_nodes(const signature& sig, FunctionConsts::FunctionKind kind) |
2888 | + : |
2889 | + function(sig, kind) |
2890 | + { |
2891 | + |
2892 | + } |
2893 | + |
2894 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2895 | + |
2896 | + bool accessesDynCtx() const { return true; } |
2897 | + |
2898 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2899 | + |
2900 | + CODEGEN_DECL(); |
2901 | +}; |
2902 | + |
2903 | + |
2904 | +//zorba-store-collections-static-dml:insert-nodes-first |
2905 | +class zorba_store_collections_static_dml_insert_nodes_first : public function |
2906 | +{ |
2907 | +public: |
2908 | + zorba_store_collections_static_dml_insert_nodes_first(const signature& sig, FunctionConsts::FunctionKind kind) |
2909 | + : |
2910 | + function(sig, kind) |
2911 | + { |
2912 | + |
2913 | + } |
2914 | + |
2915 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2916 | + |
2917 | + bool accessesDynCtx() const { return true; } |
2918 | + |
2919 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2920 | + |
2921 | + CODEGEN_DECL(); |
2922 | +}; |
2923 | + |
2924 | + |
2925 | +//zorba-store-collections-static-dml:insert-nodes-last |
2926 | +class zorba_store_collections_static_dml_insert_nodes_last : public function |
2927 | +{ |
2928 | +public: |
2929 | + zorba_store_collections_static_dml_insert_nodes_last(const signature& sig, FunctionConsts::FunctionKind kind) |
2930 | + : |
2931 | + function(sig, kind) |
2932 | + { |
2933 | + |
2934 | + } |
2935 | + |
2936 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2937 | + |
2938 | + bool accessesDynCtx() const { return true; } |
2939 | + |
2940 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
2941 | + |
2942 | + CODEGEN_DECL(); |
2943 | +}; |
2944 | + |
2945 | + |
2946 | +//zorba-store-collections-static-dml:insert-nodes-before |
2947 | +class zorba_store_collections_static_dml_insert_nodes_before : public function |
2948 | +{ |
2949 | +public: |
2950 | + zorba_store_collections_static_dml_insert_nodes_before(const signature& sig, FunctionConsts::FunctionKind kind) |
2951 | + : |
2952 | + function(sig, kind) |
2953 | + { |
2954 | + |
2955 | + } |
2956 | + |
2957 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2958 | + |
2959 | + bool accessesDynCtx() const { return true; } |
2960 | + |
2961 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
2962 | + |
2963 | + CODEGEN_DECL(); |
2964 | +}; |
2965 | + |
2966 | + |
2967 | +//zorba-store-collections-static-dml:insert-nodes-after |
2968 | +class zorba_store_collections_static_dml_insert_nodes_after : public function |
2969 | +{ |
2970 | +public: |
2971 | + zorba_store_collections_static_dml_insert_nodes_after(const signature& sig, FunctionConsts::FunctionKind kind) |
2972 | + : |
2973 | + function(sig, kind) |
2974 | + { |
2975 | + |
2976 | + } |
2977 | + |
2978 | + short getScriptingKind() const { return UPDATING_EXPR; } |
2979 | + |
2980 | + bool accessesDynCtx() const { return true; } |
2981 | + |
2982 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
2983 | + |
2984 | + CODEGEN_DECL(); |
2985 | +}; |
2986 | + |
2987 | + |
2988 | +//zorba-store-collections-static-dml:apply-insert-nodes |
2989 | +class zorba_store_collections_static_dml_apply_insert_nodes : public function |
2990 | +{ |
2991 | +public: |
2992 | + zorba_store_collections_static_dml_apply_insert_nodes(const signature& sig, FunctionConsts::FunctionKind kind) |
2993 | + : |
2994 | + function(sig, kind) |
2995 | + { |
2996 | + |
2997 | + } |
2998 | + |
2999 | + short getScriptingKind() const { return APPLYING_EXPR; } |
3000 | + |
3001 | + bool accessesDynCtx() const { return true; } |
3002 | + |
3003 | + bool propagatesInputNodes(expr* fo, csize producer) const; |
3004 | + |
3005 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
3006 | + |
3007 | + CODEGEN_DECL(); |
3008 | +}; |
3009 | + |
3010 | + |
3011 | +//zorba-store-collections-static-dml:apply-insert-nodes-first |
3012 | +class zorba_store_collections_static_dml_apply_insert_nodes_first : public function |
3013 | +{ |
3014 | +public: |
3015 | + zorba_store_collections_static_dml_apply_insert_nodes_first(const signature& sig, FunctionConsts::FunctionKind kind) |
3016 | + : |
3017 | + function(sig, kind) |
3018 | + { |
3019 | + |
3020 | + } |
3021 | + |
3022 | + short getScriptingKind() const { return APPLYING_EXPR; } |
3023 | + |
3024 | + bool accessesDynCtx() const { return true; } |
3025 | + |
3026 | + bool propagatesInputNodes(expr* fo, csize producer) const; |
3027 | + |
3028 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
3029 | + |
3030 | + CODEGEN_DECL(); |
3031 | +}; |
3032 | + |
3033 | + |
3034 | +//zorba-store-collections-static-dml:apply-insert-nodes-last |
3035 | +class zorba_store_collections_static_dml_apply_insert_nodes_last : public function |
3036 | +{ |
3037 | +public: |
3038 | + zorba_store_collections_static_dml_apply_insert_nodes_last(const signature& sig, FunctionConsts::FunctionKind kind) |
3039 | + : |
3040 | + function(sig, kind) |
3041 | + { |
3042 | + |
3043 | + } |
3044 | + |
3045 | + short getScriptingKind() const { return APPLYING_EXPR; } |
3046 | + |
3047 | + bool accessesDynCtx() const { return true; } |
3048 | + |
3049 | + bool propagatesInputNodes(expr* fo, csize producer) const; |
3050 | + |
3051 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; } |
3052 | + |
3053 | + CODEGEN_DECL(); |
3054 | +}; |
3055 | + |
3056 | + |
3057 | +//zorba-store-collections-static-dml:apply-insert-nodes-before |
3058 | +class zorba_store_collections_static_dml_apply_insert_nodes_before : public function |
3059 | +{ |
3060 | +public: |
3061 | + zorba_store_collections_static_dml_apply_insert_nodes_before(const signature& sig, FunctionConsts::FunctionKind kind) |
3062 | + : |
3063 | + function(sig, kind) |
3064 | + { |
3065 | + |
3066 | + } |
3067 | + |
3068 | + short getScriptingKind() const { return APPLYING_EXPR; } |
3069 | + |
3070 | + bool accessesDynCtx() const { return true; } |
3071 | + |
3072 | + bool propagatesInputNodes(expr* fo, csize producer) const; |
3073 | + |
3074 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
3075 | + |
3076 | + CODEGEN_DECL(); |
3077 | +}; |
3078 | + |
3079 | + |
3080 | +//zorba-store-collections-static-dml:apply-insert-nodes-after |
3081 | +class zorba_store_collections_static_dml_apply_insert_nodes_after : public function |
3082 | +{ |
3083 | +public: |
3084 | + zorba_store_collections_static_dml_apply_insert_nodes_after(const signature& sig, FunctionConsts::FunctionKind kind) |
3085 | + : |
3086 | + function(sig, kind) |
3087 | + { |
3088 | + |
3089 | + } |
3090 | + |
3091 | + short getScriptingKind() const { return APPLYING_EXPR; } |
3092 | + |
3093 | + bool accessesDynCtx() const { return true; } |
3094 | + |
3095 | + bool propagatesInputNodes(expr* fo, csize producer) const; |
3096 | + |
3097 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; } |
3098 | + |
3099 | + CODEGEN_DECL(); |
3100 | +}; |
3101 | + |
3102 | + |
3103 | +//zorba-store-collections-static-dml:delete-nodes |
3104 | +class zorba_store_collections_static_dml_delete_nodes : public function |
3105 | +{ |
3106 | +public: |
3107 | + zorba_store_collections_static_dml_delete_nodes(const signature& sig, FunctionConsts::FunctionKind kind) |
3108 | + : |
3109 | + function(sig, kind) |
3110 | + { |
3111 | + |
3112 | + } |
3113 | + |
3114 | + short getScriptingKind() const { return UPDATING_EXPR; } |
3115 | + |
3116 | + bool accessesDynCtx() const { return true; } |
3117 | + |
3118 | + BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const; |
3119 | + |
3120 | + BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const; |
3121 | + |
3122 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 0; } |
3123 | + |
3124 | + CODEGEN_DECL(); |
3125 | +}; |
3126 | + |
3127 | + |
3128 | +//zorba-store-collections-static-dml:delete-node-first |
3129 | +class zorba_store_collections_static_dml_delete_node_first : public function |
3130 | +{ |
3131 | +public: |
3132 | + zorba_store_collections_static_dml_delete_node_first(const signature& sig, FunctionConsts::FunctionKind kind) |
3133 | + : |
3134 | + function(sig, kind) |
3135 | + { |
3136 | + |
3137 | + } |
3138 | + |
3139 | + short getScriptingKind() const { return UPDATING_EXPR; } |
3140 | + |
3141 | + bool accessesDynCtx() const { return true; } |
3142 | + |
3143 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
3144 | + |
3145 | + CODEGEN_DECL(); |
3146 | +}; |
3147 | + |
3148 | + |
3149 | +//zorba-store-collections-static-dml:delete-node-last |
3150 | +class zorba_store_collections_static_dml_delete_node_last : public function |
3151 | +{ |
3152 | +public: |
3153 | + zorba_store_collections_static_dml_delete_node_last(const signature& sig, FunctionConsts::FunctionKind kind) |
3154 | + : |
3155 | + function(sig, kind) |
3156 | + { |
3157 | + |
3158 | + } |
3159 | + |
3160 | + short getScriptingKind() const { return UPDATING_EXPR; } |
3161 | + |
3162 | + bool accessesDynCtx() const { return true; } |
3163 | + |
3164 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } |
3165 | + |
3166 | + CODEGEN_DECL(); |
3167 | +}; |
3168 | + |
3169 | + |
3170 | +//zorba-store-collections-static-dml:truncate |
3171 | +class zorba_store_collections_static_dml_truncate : public function |
3172 | +{ |
3173 | +public: |
3174 | + zorba_store_collections_static_dml_truncate(const signature& sig, FunctionConsts::FunctionKind kind) |
3175 | + : |
3176 | + function(sig, kind) |
3177 | + { |
3178 | + |
3179 | + } |
3180 | + |
3181 | + short getScriptingKind() const { return UPDATING_EXPR; } |
3182 | + |
3183 | + bool accessesDynCtx() const { return true; } |
3184 | + |
3185 | + CODEGEN_DECL(); |
3186 | +}; |
3187 | + |
3188 | + |
3189 | +//zorba-store-collections-static-dml:collection-name |
3190 | +class zorba_store_collections_static_dml_collection_name : public function |
3191 | +{ |
3192 | +public: |
3193 | + zorba_store_collections_static_dml_collection_name(const signature& sig, FunctionConsts::FunctionKind kind) |
3194 | + : |
3195 | + function(sig, kind) |
3196 | + { |
3197 | + |
3198 | + } |
3199 | + |
3200 | + bool accessesDynCtx() const { return true; } |
3201 | + |
3202 | + bool mustCopyInputNodes(expr* fo, csize producer) const { return true; } |
3203 | + |
3204 | + CODEGEN_DECL(); |
3205 | +}; |
3206 | + |
3207 | + |
3208 | +//zorba-store-collections-static-ddl:is-available-collection |
3209 | +class zorba_store_collections_static_ddl_is_available_collection : public function |
3210 | +{ |
3211 | +public: |
3212 | + zorba_store_collections_static_ddl_is_available_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
3213 | + : |
3214 | + function(sig, kind) |
3215 | + { |
3216 | + |
3217 | + } |
3218 | + |
3219 | + bool accessesDynCtx() const { return true; } |
3220 | + |
3221 | + CODEGEN_DECL(); |
3222 | +}; |
3223 | + |
3224 | + |
3225 | +//zorba-store-collections-static-ddl:available-collections |
3226 | +class zorba_store_collections_static_ddl_available_collections : public function |
3227 | +{ |
3228 | +public: |
3229 | + zorba_store_collections_static_ddl_available_collections(const signature& sig, FunctionConsts::FunctionKind kind) |
3230 | + : |
3231 | + function(sig, kind) |
3232 | + { |
3233 | + |
3234 | + } |
3235 | + |
3236 | + bool accessesDynCtx() const { return true; } |
3237 | + |
3238 | + CODEGEN_DECL(); |
3239 | +}; |
3240 | + |
3241 | + |
3242 | +//zorba-store-indexes-static-ddl:is-available-index |
3243 | +class zorba_store_indexes_static_ddl_is_available_index : public function |
3244 | +{ |
3245 | +public: |
3246 | + zorba_store_indexes_static_ddl_is_available_index(const signature& sig, FunctionConsts::FunctionKind kind) |
3247 | + : |
3248 | + function(sig, kind) |
3249 | + { |
3250 | + |
3251 | + } |
3252 | + |
3253 | + bool accessesDynCtx() const { return true; } |
3254 | + |
3255 | + CODEGEN_DECL(); |
3256 | +}; |
3257 | + |
3258 | + |
3259 | +//zorba-store-indexes-static-ddl:available-indexes |
3260 | +class zorba_store_indexes_static_ddl_available_indexes : public function |
3261 | +{ |
3262 | +public: |
3263 | + zorba_store_indexes_static_ddl_available_indexes(const signature& sig, FunctionConsts::FunctionKind kind) |
3264 | + : |
3265 | + function(sig, kind) |
3266 | + { |
3267 | + |
3268 | + } |
3269 | + |
3270 | + bool accessesDynCtx() const { return true; } |
3271 | + |
3272 | + CODEGEN_DECL(); |
3273 | +}; |
3274 | + |
3275 | + |
3276 | +//zorba-store-integrity_constraints-static-ddl:is-activated-integrity-constraint |
3277 | +class zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint : public function |
3278 | +{ |
3279 | +public: |
3280 | + zorba_store_integrity_constraints_static_ddl_is_activated_integrity_constraint(const signature& sig, FunctionConsts::FunctionKind kind) |
3281 | + : |
3282 | + function(sig, kind) |
3283 | + { |
3284 | + |
3285 | + } |
3286 | + |
3287 | + bool accessesDynCtx() const { return true; } |
3288 | + |
3289 | + CODEGEN_DECL(); |
3290 | +}; |
3291 | + |
3292 | + |
3293 | +//zorba-store-integrity_constraints-static-ddl:activated-integrity-constraints |
3294 | +class zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints : public function |
3295 | +{ |
3296 | +public: |
3297 | + zorba_store_integrity_constraints_static_ddl_activated_integrity_constraints(const signature& sig, FunctionConsts::FunctionKind kind) |
3298 | + : |
3299 | + function(sig, kind) |
3300 | + { |
3301 | + |
3302 | + } |
3303 | + |
3304 | + bool accessesDynCtx() const { return true; } |
3305 | + |
3306 | + CODEGEN_DECL(); |
3307 | +}; |
3308 | + |
3309 | + |
3310 | +//zorba-store-collections-static-ddl:is-declared-collection |
3311 | +class zorba_store_collections_static_ddl_is_declared_collection : public function |
3312 | +{ |
3313 | +public: |
3314 | + zorba_store_collections_static_ddl_is_declared_collection(const signature& sig, FunctionConsts::FunctionKind kind) |
3315 | + : |
3316 | + function(sig, kind) |
3317 | + { |
3318 | + |
3319 | + } |
3320 | + |
3321 | + CODEGEN_DECL(); |
3322 | +}; |
3323 | + |
3324 | + |
3325 | +//zorba-store-collections-static-ddl:declared-collections |
3326 | +class zorba_store_collections_static_ddl_declared_collections : public function |
3327 | +{ |
3328 | +public: |
3329 | + zorba_store_collections_static_ddl_declared_collections(const signature& sig, FunctionConsts::FunctionKind kind) |
3330 | + : |
3331 | + function(sig, kind) |
3332 | + { |
3333 | + |
3334 | + } |
3335 | + |
3336 | + CODEGEN_DECL(); |
3337 | +}; |
3338 | + |
3339 | + |
3340 | +//zorba-store-indexes-static-ddl:is-declared-index |
3341 | +class zorba_store_indexes_static_ddl_is_declared_index : public function |
3342 | +{ |
3343 | +public: |
3344 | + zorba_store_indexes_static_ddl_is_declared_index(const signature& sig, FunctionConsts::FunctionKind kind) |
3345 | + : |
3346 | + function(sig, kind) |
3347 | + { |
3348 | + |
3349 | + } |
3350 | + |
3351 | + CODEGEN_DECL(); |
3352 | +}; |
3353 | + |
3354 | + |
3355 | +//zorba-store-indexes-static-ddl:declared-indexes |
3356 | +class zorba_store_indexes_static_ddl_declared_indexes : public function |
3357 | +{ |
3358 | +public: |
3359 | + zorba_store_indexes_static_ddl_declared_indexes(const signature& sig, FunctionConsts::FunctionKind kind) |
3360 | + : |
3361 | + function(sig, kind) |
3362 | + { |
3363 | + |
3364 | + } |
3365 | + |
3366 | + CODEGEN_DECL(); |
3367 | +}; |
3368 | + |
3369 | + |
3370 | +//zorba-store-integrity_constraints-static-ddl:is-declared-integrity-constraint |
3371 | +class zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint : public function |
3372 | +{ |
3373 | +public: |
3374 | + zorba_store_integrity_constraints_static_ddl_is_declared_integrity_constraint(const signature& sig, FunctionConsts::FunctionKind kind) |
3375 | + : |
3376 | + function(sig, kind) |
3377 | + { |
3378 | + |
3379 | + } |
3380 | + |
3381 | + CODEGEN_DECL(); |
3382 | +}; |
3383 | + |
3384 | + |
3385 | +//zorba-store-integrity_constraints-static-ddl:declared-integrity-constraints |
3386 | +class zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints : public function |
3387 | +{ |
3388 | +public: |
3389 | + zorba_store_integrity_constraints_static_ddl_declared_integrity_constraints(const signature& sig, FunctionConsts::FunctionKind kind) |
3390 | + : |
3391 | + function(sig, kind) |
3392 | + { |
3393 | + |
3394 | + } |
3395 | + |
3396 | + CODEGEN_DECL(); |
3397 | +}; |
3398 | + |
3399 | + |
3400 | +} //namespace zorba |
3401 | + |
3402 | + |
3403 | +#endif |
3404 | +/* |
3405 | + * Local variables: |
3406 | + * mode: c++ |
3407 | + * End: |
3408 | + */ |
3409 | |
3410 | === modified file 'src/functions/pregenerated/func_nodes.cpp' |
3411 | --- src/functions/pregenerated/func_nodes.cpp 2012-04-24 12:39:38 +0000 |
3412 | +++ src/functions/pregenerated/func_nodes.cpp 2012-05-02 06:32:20 +0000 |
3413 | @@ -231,6 +231,16 @@ |
3414 | return new LeastCommonAncestor(sctx, loc, argv); |
3415 | } |
3416 | |
3417 | +PlanIter_t fn_path_3_0::codegen( |
3418 | + CompilerCB*, |
3419 | + static_context* sctx, |
3420 | + const QueryLoc& loc, |
3421 | + std::vector<PlanIter_t>& argv, |
3422 | + expr& ann) const |
3423 | +{ |
3424 | + return new FnPathIterator(sctx, loc, argv); |
3425 | +} |
3426 | + |
3427 | void populate_context_nodes(static_context* sctx) |
3428 | { |
3429 | { |
3430 | @@ -356,6 +366,17 @@ |
3431 | |
3432 | DECL_WITH_KIND(sctx, fn_has_children_3_0, |
3433 | (createQName("http://www.w3.org/2005/xpath-functions","","has-children"), |
3434 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
3435 | + FunctionConsts::FN_HAS_CHILDREN_0); |
3436 | + |
3437 | + } |
3438 | + |
3439 | + |
3440 | + { |
3441 | + |
3442 | + |
3443 | + DECL_WITH_KIND(sctx, fn_has_children_3_0, |
3444 | + (createQName("http://www.w3.org/2005/xpath-functions","","has-children"), |
3445 | GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, |
3446 | GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
3447 | FunctionConsts::FN_HAS_CHILDREN_1); |
3448 | @@ -538,6 +559,29 @@ |
3449 | |
3450 | } |
3451 | |
3452 | + |
3453 | + { |
3454 | + |
3455 | + |
3456 | + DECL_WITH_KIND(sctx, fn_path_3_0, |
3457 | + (createQName("http://www.w3.org/2005/xpath-functions","","path"), |
3458 | + GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
3459 | + FunctionConsts::FN_PATH_0); |
3460 | + |
3461 | + } |
3462 | + |
3463 | + |
3464 | + { |
3465 | + |
3466 | + |
3467 | + DECL_WITH_KIND(sctx, fn_path_3_0, |
3468 | + (createQName("http://www.w3.org/2005/xpath-functions","","path"), |
3469 | + GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, |
3470 | + GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
3471 | + FunctionConsts::FN_PATH_1); |
3472 | + |
3473 | + } |
3474 | + |
3475 | } |
3476 | |
3477 | |
3478 | |
3479 | === modified file 'src/functions/pregenerated/func_nodes.h' |
3480 | --- src/functions/pregenerated/func_nodes.h 2012-04-24 12:39:38 +0000 |
3481 | +++ src/functions/pregenerated/func_nodes.h 2012-05-02 06:32:20 +0000 |
3482 | @@ -372,6 +372,21 @@ |
3483 | }; |
3484 | |
3485 | |
3486 | +//fn:path |
3487 | +class fn_path_3_0 : public function |
3488 | +{ |
3489 | +public: |
3490 | + fn_path_3_0(const signature& sig, FunctionConsts::FunctionKind kind) |
3491 | + : |
3492 | + function(sig, kind) |
3493 | + { |
3494 | +theXQueryVersion = StaticContextConsts::xquery_version_3_0; |
3495 | + } |
3496 | + |
3497 | + CODEGEN_DECL(); |
3498 | +}; |
3499 | + |
3500 | + |
3501 | } //namespace zorba |
3502 | |
3503 | |
3504 | |
3505 | === modified file 'src/functions/pregenerated/func_parse_fragment.cpp' |
3506 | --- src/functions/pregenerated/func_parse_fragment.cpp 2012-04-24 12:39:38 +0000 |
3507 | +++ src/functions/pregenerated/func_parse_fragment.cpp 2012-05-02 06:32:20 +0000 |
3508 | @@ -38,7 +38,7 @@ |
3509 | std::vector<PlanIter_t>& argv, |
3510 | expr& ann) const |
3511 | { |
3512 | - return new FnParseXmlFragmentIterator(sctx, loc, argv); |
3513 | + return new FnZorbaParseXmlFragmentIterator(sctx, loc, argv); |
3514 | } |
3515 | |
3516 | void populate_context_parse_fragment(static_context* sctx) |
3517 | |
3518 | === modified file 'src/functions/pregenerated/func_sequences.cpp' |
3519 | --- src/functions/pregenerated/func_sequences.cpp 2012-04-24 12:39:38 +0000 |
3520 | +++ src/functions/pregenerated/func_sequences.cpp 2012-05-02 06:32:20 +0000 |
3521 | @@ -1,923 +1,775 @@ |
3522 | -/* |
3523 | - * Copyright 2006-2008 The FLWOR Foundation. |
3524 | - * |
3525 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
3526 | - * you may not use this file except in compliance with the License. |
3527 | - * You may obtain a copy of the License at |
3528 | - * |
3529 | - * http://www.apache.org/licenses/LICENSE-2.0 |
3530 | - * |
3531 | - * Unless required by applicable law or agreed to in writing, software |
3532 | - * distributed under the License is distributed on an "AS IS" BASIS, |
3533 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
3534 | - * See the License for the specific language governing permissions and |
3535 | - * limitations under the License. |
3536 | - */ |
3537 | - |
3538 | -// ****************************************** |
3539 | -// * * |
3540 | -// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
3541 | -// * SEE .xml FILE WITH SAME NAME * |
3542 | -// * * |
3543 | -// ****************************************** |
3544 | - |
3545 | - |
3546 | -#include "stdafx.h" |
3547 | -#include "runtime/sequences/sequences.h" |
3548 | -#include "functions/func_sequences.h" |
3549 | -#include "system/globalenv.h" |
3550 | -#include "types/typeops.h" |
3551 | -#include "compiler/expression/expr_base.h" |
3552 | - |
3553 | - |
3554 | -namespace zorba{ |
3555 | - |
3556 | - |
3557 | - |
3558 | -PlanIter_t op_concatenate::codegen( |
3559 | - CompilerCB*, |
3560 | - static_context* sctx, |
3561 | - const QueryLoc& loc, |
3562 | - std::vector<PlanIter_t>& argv, |
3563 | - expr& ann) const |
3564 | -{ |
3565 | - return new FnConcatIterator(sctx, loc, argv); |
3566 | -} |
3567 | - |
3568 | -PlanIter_t fn_index_of::codegen( |
3569 | - CompilerCB*, |
3570 | - static_context* sctx, |
3571 | - const QueryLoc& loc, |
3572 | - std::vector<PlanIter_t>& argv, |
3573 | - expr& ann) const |
3574 | -{ |
3575 | - return new FnIndexOfIterator(sctx, loc, argv); |
3576 | -} |
3577 | - |
3578 | -PlanIter_t fn_empty::codegen( |
3579 | - CompilerCB*, |
3580 | - static_context* sctx, |
3581 | - const QueryLoc& loc, |
3582 | - std::vector<PlanIter_t>& argv, |
3583 | - expr& ann) const |
3584 | -{ |
3585 | - return new FnEmptyIterator(sctx, loc, argv); |
3586 | -} |
3587 | - |
3588 | -PlanIter_t fn_exists::codegen( |
3589 | - CompilerCB*, |
3590 | - static_context* sctx, |
3591 | - const QueryLoc& loc, |
3592 | - std::vector<PlanIter_t>& argv, |
3593 | - expr& ann) const |
3594 | -{ |
3595 | - return new FnExistsIterator(sctx, loc, argv); |
3596 | -} |
3597 | - |
3598 | -PlanIter_t fn_distinct_values::codegen( |
3599 | - CompilerCB*, |
3600 | - static_context* sctx, |
3601 | - const QueryLoc& loc, |
3602 | - std::vector<PlanIter_t>& argv, |
3603 | - expr& ann) const |
3604 | -{ |
3605 | - return new FnDistinctValuesIterator(sctx, loc, argv); |
3606 | -} |
3607 | - |
3608 | -PlanIter_t fn_insert_before::codegen( |
3609 | - CompilerCB*, |
3610 | - static_context* sctx, |
3611 | - const QueryLoc& loc, |
3612 | - std::vector<PlanIter_t>& argv, |
3613 | - expr& ann) const |
3614 | -{ |
3615 | - return new FnInsertBeforeIterator(sctx, loc, argv); |
3616 | -} |
3617 | - |
3618 | -PlanIter_t fn_remove::codegen( |
3619 | - CompilerCB*, |
3620 | - static_context* sctx, |
3621 | - const QueryLoc& loc, |
3622 | - std::vector<PlanIter_t>& argv, |
3623 | - expr& ann) const |
3624 | -{ |
3625 | - return new FnRemoveIterator(sctx, loc, argv); |
3626 | -} |
3627 | - |
3628 | -PlanIter_t fn_reverse::codegen( |
3629 | - CompilerCB*, |
3630 | - static_context* sctx, |
3631 | - const QueryLoc& loc, |
3632 | - std::vector<PlanIter_t>& argv, |
3633 | - expr& ann) const |
3634 | -{ |
3635 | - return new FnReverseIterator(sctx, loc, argv); |
3636 | -} |
3637 | - |
3638 | - |
3639 | - |
3640 | - |
3641 | - |
3642 | -PlanIter_t fn_one_or_more::codegen( |
3643 | - CompilerCB*, |
3644 | - static_context* sctx, |
3645 | - const QueryLoc& loc, |
3646 | - std::vector<PlanIter_t>& argv, |
3647 | - expr& ann) const |
3648 | -{ |
3649 | - return new FnOneOrMoreIterator(sctx, loc, argv); |
3650 | -} |
3651 | - |
3652 | -PlanIter_t fn_deep_equal::codegen( |
3653 | - CompilerCB*, |
3654 | - static_context* sctx, |
3655 | - const QueryLoc& loc, |
3656 | - std::vector<PlanIter_t>& argv, |
3657 | - expr& ann) const |
3658 | -{ |
3659 | - return new FnDeepEqualIterator(sctx, loc, argv); |
3660 | -} |
3661 | - |
3662 | - |
3663 | -PlanIter_t fn_avg::codegen( |
3664 | - CompilerCB*, |
3665 | - static_context* sctx, |
3666 | - const QueryLoc& loc, |
3667 | - std::vector<PlanIter_t>& argv, |
3668 | - expr& ann) const |
3669 | -{ |
3670 | - return new FnAvgIterator(sctx, loc, argv); |
3671 | -} |
3672 | - |
3673 | -PlanIter_t fn_sum::codegen( |
3674 | - CompilerCB*, |
3675 | - static_context* sctx, |
3676 | - const QueryLoc& loc, |
3677 | - std::vector<PlanIter_t>& argv, |
3678 | - expr& ann) const |
3679 | -{ |
3680 | - return new FnSumIterator(sctx, loc, argv); |
3681 | -} |
3682 | - |
3683 | -PlanIter_t op_sum_double::codegen( |
3684 | - CompilerCB*, |
3685 | - static_context* sctx, |
3686 | - const QueryLoc& loc, |
3687 | - std::vector<PlanIter_t>& argv, |
3688 | - expr& ann) const |
3689 | -{ |
3690 | - return new FnSumDoubleIterator(sctx, loc, argv); |
3691 | -} |
3692 | - |
3693 | -PlanIter_t op_sum_float::codegen( |
3694 | - CompilerCB*, |
3695 | - static_context* sctx, |
3696 | - const QueryLoc& loc, |
3697 | - std::vector<PlanIter_t>& argv, |
3698 | - expr& ann) const |
3699 | -{ |
3700 | - return new FnSumFloatIterator(sctx, loc, argv); |
3701 | -} |
3702 | - |
3703 | -PlanIter_t op_sum_decimal::codegen( |
3704 | - CompilerCB*, |
3705 | - static_context* sctx, |
3706 | - const QueryLoc& loc, |
3707 | - std::vector<PlanIter_t>& argv, |
3708 | - expr& ann) const |
3709 | -{ |
3710 | - return new FnSumDecimalIterator(sctx, loc, argv); |
3711 | -} |
3712 | - |
3713 | -PlanIter_t op_sum_integer::codegen( |
3714 | - CompilerCB*, |
3715 | - static_context* sctx, |
3716 | - const QueryLoc& loc, |
3717 | - std::vector<PlanIter_t>& argv, |
3718 | - expr& ann) const |
3719 | -{ |
3720 | - return new FnSumIntegerIterator(sctx, loc, argv); |
3721 | -} |
3722 | - |
3723 | -PlanIter_t op_to::codegen( |
3724 | - CompilerCB*, |
3725 | - static_context* sctx, |
3726 | - const QueryLoc& loc, |
3727 | - std::vector<PlanIter_t>& argv, |
3728 | - expr& ann) const |
3729 | -{ |
3730 | - return new OpToIterator(sctx, loc, argv); |
3731 | -} |
3732 | - |
3733 | -PlanIter_t fn_id::codegen( |
3734 | - CompilerCB*, |
3735 | - static_context* sctx, |
3736 | - const QueryLoc& loc, |
3737 | - std::vector<PlanIter_t>& argv, |
3738 | - expr& ann) const |
3739 | -{ |
3740 | - return new FnIdIterator(sctx, loc, argv); |
3741 | -} |
3742 | - |
3743 | -PlanIter_t fn_element_with_id::codegen( |
3744 | - CompilerCB*, |
3745 | - static_context* sctx, |
3746 | - const QueryLoc& loc, |
3747 | - std::vector<PlanIter_t>& argv, |
3748 | - expr& ann) const |
3749 | -{ |
3750 | - return new FnElementWithIdIterator(sctx, loc, argv); |
3751 | -} |
3752 | - |
3753 | -PlanIter_t fn_idref::codegen( |
3754 | - CompilerCB*, |
3755 | - static_context* sctx, |
3756 | - const QueryLoc& loc, |
3757 | - std::vector<PlanIter_t>& argv, |
3758 | - expr& ann) const |
3759 | -{ |
3760 | - return new FnIdRefIterator(sctx, loc, argv); |
3761 | -} |
3762 | - |
3763 | -PlanIter_t fn_doc::codegen( |
3764 | - CompilerCB*, |
3765 | - static_context* sctx, |
3766 | - const QueryLoc& loc, |
3767 | - std::vector<PlanIter_t>& argv, |
3768 | - expr& ann) const |
3769 | -{ |
3770 | - return new FnDocIterator(sctx, loc, argv); |
3771 | -} |
3772 | - |
3773 | -PlanIter_t fn_doc_available::codegen( |
3774 | - CompilerCB*, |
3775 | - static_context* sctx, |
3776 | - const QueryLoc& loc, |
3777 | - std::vector<PlanIter_t>& argv, |
3778 | - expr& ann) const |
3779 | -{ |
3780 | - return new FnDocAvailableIterator(sctx, loc, argv); |
3781 | -} |
3782 | - |
3783 | -PlanIter_t fn_available_environment_variables_3_0::codegen( |
3784 | - CompilerCB*, |
3785 | - static_context* sctx, |
3786 | - const QueryLoc& loc, |
3787 | - std::vector<PlanIter_t>& argv, |
3788 | - expr& ann) const |
3789 | -{ |
3790 | - return new FnAvailableEnvironmentVariablesIterator(sctx, loc, argv); |
3791 | -} |
3792 | - |
3793 | -PlanIter_t fn_environment_variable_3_0::codegen( |
3794 | - CompilerCB*, |
3795 | - static_context* sctx, |
3796 | - const QueryLoc& loc, |
3797 | - std::vector<PlanIter_t>& argv, |
3798 | - expr& ann) const |
3799 | -{ |
3800 | - return new FnEnvironmentVariableIterator(sctx, loc, argv); |
3801 | -} |
3802 | - |
3803 | -PlanIter_t fn_unparsed_text_3_0::codegen( |
3804 | - CompilerCB*, |
3805 | - static_context* sctx, |
3806 | - const QueryLoc& loc, |
3807 | - std::vector<PlanIter_t>& argv, |
3808 | - expr& ann) const |
3809 | -{ |
3810 | - return new FnUnparsedTextIterator(sctx, loc, argv); |
3811 | -} |
3812 | - |
3813 | -PlanIter_t fn_unparsed_text_available_3_0::codegen( |
3814 | - CompilerCB*, |
3815 | - static_context* sctx, |
3816 | - const QueryLoc& loc, |
3817 | - std::vector<PlanIter_t>& argv, |
3818 | - expr& ann) const |
3819 | -{ |
3820 | - return new FnUnparsedTextAvailableIterator(sctx, loc, argv); |
3821 | -} |
3822 | - |
3823 | -PlanIter_t fn_unparsed_text_lines_3_0::codegen( |
3824 | - CompilerCB*, |
3825 | - static_context* sctx, |
3826 | - const QueryLoc& loc, |
3827 | - std::vector<PlanIter_t>& argv, |
3828 | - expr& ann) const |
3829 | -{ |
3830 | - return new FnUnparsedTextLinesIterator(sctx, loc, argv); |
3831 | -} |
3832 | - |
3833 | -void populate_context_sequences(static_context* sctx) |
3834 | -{ |
3835 | - { |
3836 | - std::vector<xqtref_t> lParamTypes; |
3837 | - lParamTypes.push_back(GENV_TYPESYSTEM.ITEM_TYPE_STAR); |
3838 | - |
3839 | - DECL_WITH_KIND(sctx, op_concatenate, |
3840 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","concatenate"), |
3841 | - lParamTypes, GENV_TYPESYSTEM.ITEM_TYPE_STAR, true), |
3842 | - FunctionConsts::OP_CONCATENATE_N); |
3843 | - |
3844 | - } |
3845 | - |
3846 | - |
3847 | - { |
3848 | - |
3849 | - |
3850 | - DECL_WITH_KIND(sctx, fn_index_of, |
3851 | - (createQName("http://www.w3.org/2005/xpath-functions","","index-of"), |
3852 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
3853 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, |
3854 | - GENV_TYPESYSTEM.INTEGER_TYPE_STAR), |
3855 | - FunctionConsts::FN_INDEX_OF_2); |
3856 | - |
3857 | - } |
3858 | - |
3859 | - |
3860 | - { |
3861 | - |
3862 | - |
3863 | - DECL_WITH_KIND(sctx, fn_index_of, |
3864 | - (createQName("http://www.w3.org/2005/xpath-functions","","index-of"), |
3865 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
3866 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, |
3867 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
3868 | - GENV_TYPESYSTEM.INTEGER_TYPE_STAR), |
3869 | - FunctionConsts::FN_INDEX_OF_3); |
3870 | - |
3871 | - } |
3872 | - |
3873 | - |
3874 | - { |
3875 | - |
3876 | - |
3877 | - DECL_WITH_KIND(sctx, fn_empty, |
3878 | - (createQName("http://www.w3.org/2005/xpath-functions","","empty"), |
3879 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3880 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
3881 | - FunctionConsts::FN_EMPTY_1); |
3882 | - |
3883 | - } |
3884 | - |
3885 | - |
3886 | - { |
3887 | - |
3888 | - |
3889 | - DECL_WITH_KIND(sctx, fn_exists, |
3890 | - (createQName("http://www.w3.org/2005/xpath-functions","","exists"), |
3891 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3892 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
3893 | - FunctionConsts::FN_EXISTS_1); |
3894 | - |
3895 | - } |
3896 | - |
3897 | - |
3898 | - { |
3899 | - |
3900 | - |
3901 | - DECL_WITH_KIND(sctx, fn_distinct_values, |
3902 | - (createQName("http://www.w3.org/2005/xpath-functions","","distinct-values"), |
3903 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
3904 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
3905 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR), |
3906 | - FunctionConsts::FN_DISTINCT_VALUES_2); |
3907 | - |
3908 | - } |
3909 | - |
3910 | - |
3911 | - { |
3912 | - |
3913 | - |
3914 | - DECL_WITH_KIND(sctx, fn_distinct_values, |
3915 | - (createQName("http://www.w3.org/2005/xpath-functions","","distinct-values"), |
3916 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
3917 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR), |
3918 | - FunctionConsts::FN_DISTINCT_VALUES_1); |
3919 | - |
3920 | - } |
3921 | - |
3922 | - |
3923 | - { |
3924 | - |
3925 | - |
3926 | - DECL_WITH_KIND(sctx, fn_insert_before, |
3927 | - (createQName("http://www.w3.org/2005/xpath-functions","","insert-before"), |
3928 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3929 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
3930 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3931 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
3932 | - FunctionConsts::FN_INSERT_BEFORE_3); |
3933 | - |
3934 | - } |
3935 | - |
3936 | - |
3937 | - { |
3938 | - |
3939 | - |
3940 | - DECL_WITH_KIND(sctx, fn_remove, |
3941 | - (createQName("http://www.w3.org/2005/xpath-functions","","remove"), |
3942 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3943 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
3944 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
3945 | - FunctionConsts::FN_REMOVE_2); |
3946 | - |
3947 | - } |
3948 | - |
3949 | - |
3950 | - { |
3951 | - |
3952 | - |
3953 | - DECL_WITH_KIND(sctx, fn_reverse, |
3954 | - (createQName("http://www.w3.org/2005/xpath-functions","","reverse"), |
3955 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3956 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
3957 | - FunctionConsts::FN_REVERSE_1); |
3958 | - |
3959 | - } |
3960 | - |
3961 | - |
3962 | - { |
3963 | - |
3964 | - |
3965 | - DECL_WITH_KIND(sctx, fn_subsequence, |
3966 | - (createQName("http://www.w3.org/2005/xpath-functions","","subsequence"), |
3967 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3968 | - GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, |
3969 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
3970 | - FunctionConsts::FN_SUBSEQUENCE_2); |
3971 | - |
3972 | - } |
3973 | - |
3974 | - |
3975 | - { |
3976 | - |
3977 | - |
3978 | - DECL_WITH_KIND(sctx, fn_subsequence, |
3979 | - (createQName("http://www.w3.org/2005/xpath-functions","","subsequence"), |
3980 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3981 | - GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, |
3982 | - GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, |
3983 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
3984 | - FunctionConsts::FN_SUBSEQUENCE_3); |
3985 | - |
3986 | - } |
3987 | - |
3988 | - |
3989 | - { |
3990 | - |
3991 | - |
3992 | - DECL_WITH_KIND(sctx, op_zorba_subsequence_int, |
3993 | - (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","subsequence-int"), |
3994 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
3995 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
3996 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
3997 | - FunctionConsts::OP_ZORBA_SUBSEQUENCE_INT_2); |
3998 | - |
3999 | - } |
4000 | - |
4001 | - |
4002 | - { |
4003 | - |
4004 | - |
4005 | - DECL_WITH_KIND(sctx, op_zorba_subsequence_int, |
4006 | - (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","subsequence-int"), |
4007 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4008 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4009 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4010 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4011 | - FunctionConsts::OP_ZORBA_SUBSEQUENCE_INT_3); |
4012 | - |
4013 | - } |
4014 | - |
4015 | - |
4016 | - { |
4017 | - |
4018 | - |
4019 | - DECL_WITH_KIND(sctx, op_zorba_sequence_point_access, |
4020 | - (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","sequence-point-access"), |
4021 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4022 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4023 | - GENV_TYPESYSTEM.ITEM_TYPE_QUESTION), |
4024 | - FunctionConsts::OP_ZORBA_SEQUENCE_POINT_ACCESS_2); |
4025 | - |
4026 | - } |
4027 | - |
4028 | - |
4029 | - { |
4030 | - |
4031 | - |
4032 | - DECL_WITH_KIND(sctx, fn_zero_or_one, |
4033 | - (createQName("http://www.w3.org/2005/xpath-functions","","zero-or-one"), |
4034 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4035 | - GENV_TYPESYSTEM.ITEM_TYPE_QUESTION), |
4036 | - FunctionConsts::FN_ZERO_OR_ONE_1); |
4037 | - |
4038 | - } |
4039 | - |
4040 | - |
4041 | - { |
4042 | - |
4043 | - |
4044 | - DECL_WITH_KIND(sctx, fn_one_or_more, |
4045 | - (createQName("http://www.w3.org/2005/xpath-functions","","one-or-more"), |
4046 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4047 | - GENV_TYPESYSTEM.ITEM_TYPE_PLUS), |
4048 | - FunctionConsts::FN_ONE_OR_MORE_1); |
4049 | - |
4050 | - } |
4051 | - |
4052 | - |
4053 | - { |
4054 | - |
4055 | - |
4056 | - DECL_WITH_KIND(sctx, fn_deep_equal, |
4057 | - (createQName("http://www.w3.org/2005/xpath-functions","","deep-equal"), |
4058 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4059 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4060 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4061 | - FunctionConsts::FN_DEEP_EQUAL_2); |
4062 | - |
4063 | - } |
4064 | - |
4065 | - |
4066 | - { |
4067 | - |
4068 | - |
4069 | - DECL_WITH_KIND(sctx, fn_deep_equal, |
4070 | - (createQName("http://www.w3.org/2005/xpath-functions","","deep-equal"), |
4071 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4072 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4073 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4074 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4075 | - FunctionConsts::FN_DEEP_EQUAL_3); |
4076 | - |
4077 | - } |
4078 | - |
4079 | - |
4080 | - { |
4081 | - |
4082 | - |
4083 | - DECL_WITH_KIND(sctx, fn_count, |
4084 | - (createQName("http://www.w3.org/2005/xpath-functions","","count"), |
4085 | - GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4086 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
4087 | - FunctionConsts::FN_COUNT_1); |
4088 | - |
4089 | - } |
4090 | - |
4091 | - |
4092 | - { |
4093 | - |
4094 | - |
4095 | - DECL_WITH_KIND(sctx, fn_avg, |
4096 | - (createQName("http://www.w3.org/2005/xpath-functions","","avg"), |
4097 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4098 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4099 | - FunctionConsts::FN_AVG_1); |
4100 | - |
4101 | - } |
4102 | - |
4103 | - |
4104 | - { |
4105 | - |
4106 | - |
4107 | - DECL_WITH_KIND(sctx, fn_sum, |
4108 | - (createQName("http://www.w3.org/2005/xpath-functions","","sum"), |
4109 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4110 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE), |
4111 | - FunctionConsts::FN_SUM_1); |
4112 | - |
4113 | - } |
4114 | - |
4115 | - |
4116 | - { |
4117 | - |
4118 | - |
4119 | - DECL_WITH_KIND(sctx, fn_sum, |
4120 | - (createQName("http://www.w3.org/2005/xpath-functions","","sum"), |
4121 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4122 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, |
4123 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4124 | - FunctionConsts::FN_SUM_2); |
4125 | - |
4126 | - } |
4127 | - |
4128 | - |
4129 | - { |
4130 | - |
4131 | - |
4132 | - DECL_WITH_KIND(sctx, op_sum_double, |
4133 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_double"), |
4134 | - GENV_TYPESYSTEM.DOUBLE_TYPE_STAR, |
4135 | - GENV_TYPESYSTEM.DOUBLE_TYPE_ONE), |
4136 | - FunctionConsts::OP_SUM_DOUBLE_1); |
4137 | - |
4138 | - } |
4139 | - |
4140 | - |
4141 | - { |
4142 | - |
4143 | - |
4144 | - DECL_WITH_KIND(sctx, op_sum_double, |
4145 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_double"), |
4146 | - GENV_TYPESYSTEM.DOUBLE_TYPE_STAR, |
4147 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, |
4148 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4149 | - FunctionConsts::OP_SUM_DOUBLE_2); |
4150 | - |
4151 | - } |
4152 | - |
4153 | - |
4154 | - { |
4155 | - |
4156 | - |
4157 | - DECL_WITH_KIND(sctx, op_sum_float, |
4158 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_float"), |
4159 | - GENV_TYPESYSTEM.FLOAT_TYPE_STAR, |
4160 | - GENV_TYPESYSTEM.FLOAT_TYPE_ONE), |
4161 | - FunctionConsts::OP_SUM_FLOAT_1); |
4162 | - |
4163 | - } |
4164 | - |
4165 | - |
4166 | - { |
4167 | - |
4168 | - |
4169 | - DECL_WITH_KIND(sctx, op_sum_float, |
4170 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_float"), |
4171 | - GENV_TYPESYSTEM.FLOAT_TYPE_STAR, |
4172 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, |
4173 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4174 | - FunctionConsts::OP_SUM_FLOAT_2); |
4175 | - |
4176 | - } |
4177 | - |
4178 | - |
4179 | - { |
4180 | - |
4181 | - |
4182 | - DECL_WITH_KIND(sctx, op_sum_decimal, |
4183 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_decimal"), |
4184 | - GENV_TYPESYSTEM.DECIMAL_TYPE_STAR, |
4185 | - GENV_TYPESYSTEM.DECIMAL_TYPE_ONE), |
4186 | - FunctionConsts::OP_SUM_DECIMAL_1); |
4187 | - |
4188 | - } |
4189 | - |
4190 | - |
4191 | - { |
4192 | - |
4193 | - |
4194 | - DECL_WITH_KIND(sctx, op_sum_decimal, |
4195 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_decimal"), |
4196 | - GENV_TYPESYSTEM.DECIMAL_TYPE_STAR, |
4197 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, |
4198 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4199 | - FunctionConsts::OP_SUM_DECIMAL_2); |
4200 | - |
4201 | - } |
4202 | - |
4203 | - |
4204 | - { |
4205 | - |
4206 | - |
4207 | - DECL_WITH_KIND(sctx, op_sum_integer, |
4208 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_integer"), |
4209 | - GENV_TYPESYSTEM.INTEGER_TYPE_STAR, |
4210 | - GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
4211 | - FunctionConsts::OP_SUM_INTEGER_1); |
4212 | - |
4213 | - } |
4214 | - |
4215 | - |
4216 | - { |
4217 | - |
4218 | - |
4219 | - DECL_WITH_KIND(sctx, op_sum_integer, |
4220 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","sum_integer"), |
4221 | - GENV_TYPESYSTEM.INTEGER_TYPE_STAR, |
4222 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, |
4223 | - GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4224 | - FunctionConsts::OP_SUM_INTEGER_2); |
4225 | - |
4226 | - } |
4227 | - |
4228 | - |
4229 | - { |
4230 | - |
4231 | - |
4232 | - DECL_WITH_KIND(sctx, op_to, |
4233 | - (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","to"), |
4234 | - GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION, |
4235 | - GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION, |
4236 | - GENV_TYPESYSTEM.INTEGER_TYPE_STAR), |
4237 | - FunctionConsts::OP_TO_2); |
4238 | - |
4239 | - } |
4240 | - |
4241 | - |
4242 | - { |
4243 | - |
4244 | - |
4245 | - DECL_WITH_KIND(sctx, fn_id, |
4246 | - (createQName("http://www.w3.org/2005/xpath-functions","","id"), |
4247 | - GENV_TYPESYSTEM.STRING_TYPE_STAR, |
4248 | - GENV_TYPESYSTEM.ELEMENT_TYPE_STAR), |
4249 | - FunctionConsts::FN_ID_1); |
4250 | - |
4251 | - } |
4252 | - |
4253 | - |
4254 | - { |
4255 | - |
4256 | - |
4257 | - DECL_WITH_KIND(sctx, fn_id, |
4258 | - (createQName("http://www.w3.org/2005/xpath-functions","","id"), |
4259 | - GENV_TYPESYSTEM.STRING_TYPE_STAR, |
4260 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
4261 | - GENV_TYPESYSTEM.ELEMENT_TYPE_STAR), |
4262 | - FunctionConsts::FN_ID_2); |
4263 | - |
4264 | - } |
4265 | - |
4266 | - |
4267 | - { |
4268 | - |
4269 | - |
4270 | - DECL_WITH_KIND(sctx, fn_element_with_id, |
4271 | - (createQName("http://www.w3.org/2005/xpath-functions","","element-with-id"), |
4272 | - GENV_TYPESYSTEM.STRING_TYPE_STAR, |
4273 | - GENV_TYPESYSTEM.ELEMENT_TYPE_STAR), |
4274 | - FunctionConsts::FN_ELEMENT_WITH_ID_1); |
4275 | - |
4276 | - } |
4277 | - |
4278 | - |
4279 | - { |
4280 | - |
4281 | - |
4282 | - DECL_WITH_KIND(sctx, fn_element_with_id, |
4283 | - (createQName("http://www.w3.org/2005/xpath-functions","","element-with-id"), |
4284 | - GENV_TYPESYSTEM.STRING_TYPE_STAR, |
4285 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
4286 | - GENV_TYPESYSTEM.ELEMENT_TYPE_STAR), |
4287 | - FunctionConsts::FN_ELEMENT_WITH_ID_2); |
4288 | - |
4289 | - } |
4290 | - |
4291 | - |
4292 | - { |
4293 | - |
4294 | - |
4295 | - DECL_WITH_KIND(sctx, fn_idref, |
4296 | - (createQName("http://www.w3.org/2005/xpath-functions","","idref"), |
4297 | - GENV_TYPESYSTEM.STRING_TYPE_STAR, |
4298 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
4299 | - FunctionConsts::FN_IDREF_1); |
4300 | - |
4301 | - } |
4302 | - |
4303 | - |
4304 | - { |
4305 | - |
4306 | - |
4307 | - DECL_WITH_KIND(sctx, fn_idref, |
4308 | - (createQName("http://www.w3.org/2005/xpath-functions","","idref"), |
4309 | - GENV_TYPESYSTEM.STRING_TYPE_STAR, |
4310 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, |
4311 | - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), |
4312 | - FunctionConsts::FN_IDREF_2); |
4313 | - |
4314 | - } |
4315 | - |
4316 | - |
4317 | - { |
4318 | - |
4319 | - |
4320 | - DECL_WITH_KIND(sctx, fn_doc, |
4321 | - (createQName("http://www.w3.org/2005/xpath-functions","","doc"), |
4322 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4323 | - GENV_TYPESYSTEM.DOCUMENT_UNTYPED_TYPE_QUESTION), |
4324 | - FunctionConsts::FN_DOC_1); |
4325 | - |
4326 | - } |
4327 | - |
4328 | - |
4329 | - { |
4330 | - |
4331 | - |
4332 | - DECL_WITH_KIND(sctx, fn_doc_available, |
4333 | - (createQName("http://www.w3.org/2005/xpath-functions","","doc-available"), |
4334 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4335 | - GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4336 | - FunctionConsts::FN_DOC_AVAILABLE_1); |
4337 | - |
4338 | - } |
4339 | - |
4340 | - |
4341 | - { |
4342 | - |
4343 | - |
4344 | - DECL_WITH_KIND(sctx, fn_available_environment_variables_3_0, |
4345 | - (createQName("http://www.w3.org/2005/xpath-functions","","available-environment-variables"), |
4346 | - GENV_TYPESYSTEM.STRING_TYPE_STAR), |
4347 | - FunctionConsts::FN_AVAILABLE_ENVIRONMENT_VARIABLES_0); |
4348 | - |
4349 | - } |
4350 | - |
4351 | - |
4352 | - { |
4353 | - |
4354 | - |
4355 | - DECL_WITH_KIND(sctx, fn_environment_variable_3_0, |
4356 | - (createQName("http://www.w3.org/2005/xpath-functions","","environment-variable"), |
4357 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4358 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
4359 | - FunctionConsts::FN_ENVIRONMENT_VARIABLE_1); |
4360 | - |
4361 | - } |
4362 | - |
4363 | - |
4364 | - { |
4365 | - |
4366 | - |
4367 | - DECL_WITH_KIND(sctx, fn_unparsed_text_3_0, |
4368 | - (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"), |
4369 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4370 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
4371 | - FunctionConsts::FN_UNPARSED_TEXT_1); |
4372 | - |
4373 | - } |
4374 | - |
4375 | - |
4376 | - { |
4377 | - |
4378 | - |
4379 | - DECL_WITH_KIND(sctx, fn_unparsed_text_3_0, |
4380 | - (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"), |
4381 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4382 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4383 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
4384 | - FunctionConsts::FN_UNPARSED_TEXT_2); |
4385 | - |
4386 | - } |
4387 | - |
4388 | - |
4389 | - { |
4390 | - |
4391 | - |
4392 | - DECL_WITH_KIND(sctx, fn_unparsed_text_available_3_0, |
4393 | - (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"), |
4394 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4395 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
4396 | - FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_1); |
4397 | - |
4398 | - } |
4399 | - |
4400 | - |
4401 | - { |
4402 | - |
4403 | - |
4404 | - DECL_WITH_KIND(sctx, fn_unparsed_text_available_3_0, |
4405 | - (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"), |
4406 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4407 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4408 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION), |
4409 | - FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_2); |
4410 | - |
4411 | - } |
4412 | - |
4413 | - |
4414 | - { |
4415 | - |
4416 | - |
4417 | - DECL_WITH_KIND(sctx, fn_unparsed_text_lines_3_0, |
4418 | - (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-lines"), |
4419 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4420 | - GENV_TYPESYSTEM.STRING_TYPE_STAR), |
4421 | - FunctionConsts::FN_UNPARSED_TEXT_LINES_1); |
4422 | - |
4423 | - } |
4424 | - |
4425 | - |
4426 | - { |
4427 | - |
4428 | - |
4429 | - DECL_WITH_KIND(sctx, fn_unparsed_text_lines_3_0, |
4430 | - (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-lines"), |
4431 | - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, |
4432 | - GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4433 | - GENV_TYPESYSTEM.STRING_TYPE_STAR), |
4434 | - FunctionConsts::FN_UNPARSED_TEXT_LINES_2); |
4435 | - |
4436 | - } |
4437 | - |
4438 | -} |
4439 | - |
4440 | - |
4441 | -} |
4442 | - |
4443 | - |
4444 | - |
4445 | +/* |
4446 | + * Copyright 2006-2008 The FLWOR Foundation. |
4447 | + * |
4448 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
4449 | + * you may not use this file except in compliance with the License. |
4450 | + * You may obtain a copy of the License at |
4451 | + * |
4452 | + * http://www.apache.org/licenses/LICENSE-2.0 |
4453 | + * |
4454 | + * Unless required by applicable law or agreed to in writing, software |
4455 | + * distributed under the License is distributed on an "AS IS" BASIS, |
4456 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
4457 | + * See the License for the specific language governing permissions and |
4458 | + * limitations under the License. |
4459 | + */ |
4460 | + |
4461 | +// ****************************************** |
4462 | +// * * |
4463 | +// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
4464 | +// * SEE .xml FILE WITH SAME NAME * |
4465 | +// * * |
4466 | +// ****************************************** |
4467 | + |
4468 | + |
4469 | +#include "stdafx.h" |
4470 | +#include "runtime/sequences/sequences.h" |
4471 | +#include "functions/func_sequences.h" |
4472 | +#include "system/globalenv.h" |
4473 | +#include "types/typeops.h" |
4474 | +#include "compiler/expression/expr_base.h" |
4475 | + |
4476 | + |
4477 | +namespace zorba{ |
4478 | + |
4479 | + |
4480 | + |
4481 | +PlanIter_t op_concatenate::codegen( |
4482 | + CompilerCB*, |
4483 | + static_context* sctx, |
4484 | + const QueryLoc& loc, |
4485 | + std::vector<PlanIter_t>& argv, |
4486 | + expr& ann) const |
4487 | +{ |
4488 | + return new FnConcatIterator(sctx, loc, argv); |
4489 | +} |
4490 | + |
4491 | +PlanIter_t fn_index_of::codegen( |
4492 | + CompilerCB*, |
4493 | + static_context* sctx, |
4494 | + const QueryLoc& loc, |
4495 | + std::vector<PlanIter_t>& argv, |
4496 | + expr& ann) const |
4497 | +{ |
4498 | + return new FnIndexOfIterator(sctx, loc, argv); |
4499 | +} |
4500 | + |
4501 | +PlanIter_t fn_empty::codegen( |
4502 | + CompilerCB*, |
4503 | + static_context* sctx, |
4504 | + const QueryLoc& loc, |
4505 | + std::vector<PlanIter_t>& argv, |
4506 | + expr& ann) const |
4507 | +{ |
4508 | + return new FnEmptyIterator(sctx, loc, argv); |
4509 | +} |
4510 | + |
4511 | +PlanIter_t fn_exists::codegen( |
4512 | + CompilerCB*, |
4513 | + static_context* sctx, |
4514 | + const QueryLoc& loc, |
4515 | + std::vector<PlanIter_t>& argv, |
4516 | + expr& ann) const |
4517 | +{ |
4518 | + return new FnExistsIterator(sctx, loc, argv); |
4519 | +} |
4520 | + |
4521 | +PlanIter_t fn_distinct_values::codegen( |
4522 | + CompilerCB*, |
4523 | + static_context* sctx, |
4524 | + const QueryLoc& loc, |
4525 | + std::vector<PlanIter_t>& argv, |
4526 | + expr& ann) const |
4527 | +{ |
4528 | + return new FnDistinctValuesIterator(sctx, loc, argv); |
4529 | +} |
4530 | + |
4531 | +PlanIter_t fn_insert_before::codegen( |
4532 | + CompilerCB*, |
4533 | + static_context* sctx, |
4534 | + const QueryLoc& loc, |
4535 | + std::vector<PlanIter_t>& argv, |
4536 | + expr& ann) const |
4537 | +{ |
4538 | + return new FnInsertBeforeIterator(sctx, loc, argv); |
4539 | +} |
4540 | + |
4541 | +PlanIter_t fn_remove::codegen( |
4542 | + CompilerCB*, |
4543 | + static_context* sctx, |
4544 | + const QueryLoc& loc, |
4545 | + std::vector<PlanIter_t>& argv, |
4546 | + expr& ann) const |
4547 | +{ |
4548 | + return new FnRemoveIterator(sctx, loc, argv); |
4549 | +} |
4550 | + |
4551 | +PlanIter_t fn_reverse::codegen( |
4552 | + CompilerCB*, |
4553 | + static_context* sctx, |
4554 | + const QueryLoc& loc, |
4555 | + std::vector<PlanIter_t>& argv, |
4556 | + expr& ann) const |
4557 | +{ |
4558 | + return new FnReverseIterator(sctx, loc, argv); |
4559 | +} |
4560 | + |
4561 | + |
4562 | + |
4563 | + |
4564 | + |
4565 | +PlanIter_t fn_one_or_more::codegen( |
4566 | + CompilerCB*, |
4567 | + static_context* sctx, |
4568 | + const QueryLoc& loc, |
4569 | + std::vector<PlanIter_t>& argv, |
4570 | + expr& ann) const |
4571 | +{ |
4572 | + return new FnOneOrMoreIterator(sctx, loc, argv); |
4573 | +} |
4574 | + |
4575 | +PlanIter_t fn_deep_equal::codegen( |
4576 | + CompilerCB*, |
4577 | + static_context* sctx, |
4578 | + const QueryLoc& loc, |
4579 | + std::vector<PlanIter_t>& argv, |
4580 | + expr& ann) const |
4581 | +{ |
4582 | + return new FnDeepEqualIterator(sctx, loc, argv); |
4583 | +} |
4584 | + |
4585 | + |
4586 | +PlanIter_t fn_avg::codegen( |
4587 | + CompilerCB*, |
4588 | + static_context* sctx, |
4589 | + const QueryLoc& loc, |
4590 | + std::vector<PlanIter_t>& argv, |
4591 | + expr& ann) const |
4592 | +{ |
4593 | + return new FnAvgIterator(sctx, loc, argv); |
4594 | +} |
4595 | + |
4596 | +PlanIter_t fn_sum::codegen( |
4597 | + CompilerCB*, |
4598 | + static_context* sctx, |
4599 | + const QueryLoc& loc, |
4600 | + std::vector<PlanIter_t>& argv, |
4601 | + expr& ann) const |
4602 | +{ |
4603 | + return new FnSumIterator(sctx, loc, argv); |
4604 | +} |
4605 | + |
4606 | +PlanIter_t op_sum_double::codegen( |
4607 | + CompilerCB*, |
4608 | + static_context* sctx, |
4609 | + const QueryLoc& loc, |
4610 | + std::vector<PlanIter_t>& argv, |
4611 | + expr& ann) const |
4612 | +{ |
4613 | + return new FnSumDoubleIterator(sctx, loc, argv); |
4614 | +} |
4615 | + |
4616 | +PlanIter_t op_sum_float::codegen( |
4617 | + CompilerCB*, |
4618 | + static_context* sctx, |
4619 | + const QueryLoc& loc, |
4620 | + std::vector<PlanIter_t>& argv, |
4621 | + expr& ann) const |
4622 | +{ |
4623 | + return new FnSumFloatIterator(sctx, loc, argv); |
4624 | +} |
4625 | + |
4626 | +PlanIter_t op_sum_decimal::codegen( |
4627 | + CompilerCB*, |
4628 | + static_context* sctx, |
4629 | + const QueryLoc& loc, |
4630 | + std::vector<PlanIter_t>& argv, |
4631 | + expr& ann) const |
4632 | +{ |
4633 | + return new FnSumDecimalIterator(sctx, loc, argv); |
4634 | +} |
4635 | + |
4636 | +PlanIter_t op_sum_integer::codegen( |
4637 | + CompilerCB*, |
4638 | + static_context* sctx, |
4639 | + const QueryLoc& loc, |
4640 | + std::vector<PlanIter_t>& argv, |
4641 | + expr& ann) const |
4642 | +{ |
4643 | + return new FnSumIntegerIterator(sctx, loc, argv); |
4644 | +} |
4645 | + |
4646 | +PlanIter_t op_to::codegen( |
4647 | + CompilerCB*, |
4648 | + static_context* sctx, |
4649 | + const QueryLoc& loc, |
4650 | + std::vector<PlanIter_t>& argv, |
4651 | + expr& ann) const |
4652 | +{ |
4653 | + return new OpToIterator(sctx, loc, argv); |
4654 | +} |
4655 | + |
4656 | +PlanIter_t fn_id::codegen( |
4657 | + CompilerCB*, |
4658 | + static_context* sctx, |
4659 | + const QueryLoc& loc, |
4660 | + std::vector<PlanIter_t>& argv, |
4661 | + expr& ann) const |
4662 | +{ |
4663 | + return new FnIdIterator(sctx, loc, argv); |
4664 | +} |
4665 | + |
4666 | +PlanIter_t fn_element_with_id::codegen( |
4667 | + CompilerCB*, |
4668 | + static_context* sctx, |
4669 | + const QueryLoc& loc, |
4670 | + std::vector<PlanIter_t>& argv, |
4671 | + expr& ann) const |
4672 | +{ |
4673 | + return new FnElementWithIdIterator(sctx, loc, argv); |
4674 | +} |
4675 | + |
4676 | +PlanIter_t fn_idref::codegen( |
4677 | + CompilerCB*, |
4678 | + static_context* sctx, |
4679 | + const QueryLoc& loc, |
4680 | + std::vector<PlanIter_t>& argv, |
4681 | + expr& ann) const |
4682 | +{ |
4683 | + return new FnIdRefIterator(sctx, loc, argv); |
4684 | +} |
4685 | + |
4686 | +PlanIter_t fn_doc::codegen( |
4687 | + CompilerCB*, |
4688 | + static_context* sctx, |
4689 | + const QueryLoc& loc, |
4690 | + std::vector<PlanIter_t>& argv, |
4691 | + expr& ann) const |
4692 | +{ |
4693 | + return new FnDocIterator(sctx, loc, argv); |
4694 | +} |
4695 | + |
4696 | +PlanIter_t fn_doc_available::codegen( |
4697 | + CompilerCB*, |
4698 | + static_context* sctx, |
4699 | + const QueryLoc& loc, |
4700 | + std::vector<PlanIter_t>& argv, |
4701 | + expr& ann) const |
4702 | +{ |
4703 | + return new FnDocAvailableIterator(sctx, loc, argv); |
4704 | +} |
4705 | + |
4706 | +void populate_context_sequences(static_context* sctx) |
4707 | +{ |
4708 | + { |
4709 | + std::vector<xqtref_t> lParamTypes; |
4710 | + lParamTypes.push_back(GENV_TYPESYSTEM.ITEM_TYPE_STAR); |
4711 | + |
4712 | + DECL_WITH_KIND(sctx, op_concatenate, |
4713 | + (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","concatenate"), |
4714 | + lParamTypes, GENV_TYPESYSTEM.ITEM_TYPE_STAR, true), |
4715 | + FunctionConsts::OP_CONCATENATE_N); |
4716 | + |
4717 | + } |
4718 | + |
4719 | + |
4720 | + { |
4721 | + |
4722 | + |
4723 | + DECL_WITH_KIND(sctx, fn_index_of, |
4724 | + (createQName("http://www.w3.org/2005/xpath-functions","","index-of"), |
4725 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4726 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, |
4727 | + GENV_TYPESYSTEM.INTEGER_TYPE_STAR), |
4728 | + FunctionConsts::FN_INDEX_OF_2); |
4729 | + |
4730 | + } |
4731 | + |
4732 | + |
4733 | + { |
4734 | + |
4735 | + |
4736 | + DECL_WITH_KIND(sctx, fn_index_of, |
4737 | + (createQName("http://www.w3.org/2005/xpath-functions","","index-of"), |
4738 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4739 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, |
4740 | + GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4741 | + GENV_TYPESYSTEM.INTEGER_TYPE_STAR), |
4742 | + FunctionConsts::FN_INDEX_OF_3); |
4743 | + |
4744 | + } |
4745 | + |
4746 | + |
4747 | + { |
4748 | + |
4749 | + |
4750 | + DECL_WITH_KIND(sctx, fn_empty, |
4751 | + (createQName("http://www.w3.org/2005/xpath-functions","","empty"), |
4752 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4753 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4754 | + FunctionConsts::FN_EMPTY_1); |
4755 | + |
4756 | + } |
4757 | + |
4758 | + |
4759 | + { |
4760 | + |
4761 | + |
4762 | + DECL_WITH_KIND(sctx, fn_exists, |
4763 | + (createQName("http://www.w3.org/2005/xpath-functions","","exists"), |
4764 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4765 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4766 | + FunctionConsts::FN_EXISTS_1); |
4767 | + |
4768 | + } |
4769 | + |
4770 | + |
4771 | + { |
4772 | + |
4773 | + |
4774 | + DECL_WITH_KIND(sctx, fn_distinct_values, |
4775 | + (createQName("http://www.w3.org/2005/xpath-functions","","distinct-values"), |
4776 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4777 | + GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4778 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR), |
4779 | + FunctionConsts::FN_DISTINCT_VALUES_2); |
4780 | + |
4781 | + } |
4782 | + |
4783 | + |
4784 | + { |
4785 | + |
4786 | + |
4787 | + DECL_WITH_KIND(sctx, fn_distinct_values, |
4788 | + (createQName("http://www.w3.org/2005/xpath-functions","","distinct-values"), |
4789 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4790 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR), |
4791 | + FunctionConsts::FN_DISTINCT_VALUES_1); |
4792 | + |
4793 | + } |
4794 | + |
4795 | + |
4796 | + { |
4797 | + |
4798 | + |
4799 | + DECL_WITH_KIND(sctx, fn_insert_before, |
4800 | + (createQName("http://www.w3.org/2005/xpath-functions","","insert-before"), |
4801 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4802 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4803 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4804 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4805 | + FunctionConsts::FN_INSERT_BEFORE_3); |
4806 | + |
4807 | + } |
4808 | + |
4809 | + |
4810 | + { |
4811 | + |
4812 | + |
4813 | + DECL_WITH_KIND(sctx, fn_remove, |
4814 | + (createQName("http://www.w3.org/2005/xpath-functions","","remove"), |
4815 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4816 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4817 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4818 | + FunctionConsts::FN_REMOVE_2); |
4819 | + |
4820 | + } |
4821 | + |
4822 | + |
4823 | + { |
4824 | + |
4825 | + |
4826 | + DECL_WITH_KIND(sctx, fn_reverse, |
4827 | + (createQName("http://www.w3.org/2005/xpath-functions","","reverse"), |
4828 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4829 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4830 | + FunctionConsts::FN_REVERSE_1); |
4831 | + |
4832 | + } |
4833 | + |
4834 | + |
4835 | + { |
4836 | + |
4837 | + |
4838 | + DECL_WITH_KIND(sctx, fn_subsequence, |
4839 | + (createQName("http://www.w3.org/2005/xpath-functions","","subsequence"), |
4840 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4841 | + GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, |
4842 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4843 | + FunctionConsts::FN_SUBSEQUENCE_2); |
4844 | + |
4845 | + } |
4846 | + |
4847 | + |
4848 | + { |
4849 | + |
4850 | + |
4851 | + DECL_WITH_KIND(sctx, fn_subsequence, |
4852 | + (createQName("http://www.w3.org/2005/xpath-functions","","subsequence"), |
4853 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4854 | + GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, |
4855 | + GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, |
4856 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4857 | + FunctionConsts::FN_SUBSEQUENCE_3); |
4858 | + |
4859 | + } |
4860 | + |
4861 | + |
4862 | + { |
4863 | + |
4864 | + |
4865 | + DECL_WITH_KIND(sctx, op_zorba_subsequence_int, |
4866 | + (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","subsequence-int"), |
4867 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4868 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4869 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4870 | + FunctionConsts::OP_ZORBA_SUBSEQUENCE_INT_2); |
4871 | + |
4872 | + } |
4873 | + |
4874 | + |
4875 | + { |
4876 | + |
4877 | + |
4878 | + DECL_WITH_KIND(sctx, op_zorba_subsequence_int, |
4879 | + (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","subsequence-int"), |
4880 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4881 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4882 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4883 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR), |
4884 | + FunctionConsts::OP_ZORBA_SUBSEQUENCE_INT_3); |
4885 | + |
4886 | + } |
4887 | + |
4888 | + |
4889 | + { |
4890 | + |
4891 | + |
4892 | + DECL_WITH_KIND(sctx, op_zorba_sequence_point_access, |
4893 | + (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","sequence-point-access"), |
4894 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4895 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE, |
4896 | + GENV_TYPESYSTEM.ITEM_TYPE_QUESTION), |
4897 | + FunctionConsts::OP_ZORBA_SEQUENCE_POINT_ACCESS_2); |
4898 | + |
4899 | + } |
4900 | + |
4901 | + |
4902 | + { |
4903 | + |
4904 | + |
4905 | + DECL_WITH_KIND(sctx, fn_zero_or_one, |
4906 | + (createQName("http://www.w3.org/2005/xpath-functions","","zero-or-one"), |
4907 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4908 | + GENV_TYPESYSTEM.ITEM_TYPE_QUESTION), |
4909 | + FunctionConsts::FN_ZERO_OR_ONE_1); |
4910 | + |
4911 | + } |
4912 | + |
4913 | + |
4914 | + { |
4915 | + |
4916 | + |
4917 | + DECL_WITH_KIND(sctx, fn_one_or_more, |
4918 | + (createQName("http://www.w3.org/2005/xpath-functions","","one-or-more"), |
4919 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4920 | + GENV_TYPESYSTEM.ITEM_TYPE_PLUS), |
4921 | + FunctionConsts::FN_ONE_OR_MORE_1); |
4922 | + |
4923 | + } |
4924 | + |
4925 | + |
4926 | + { |
4927 | + |
4928 | + |
4929 | + DECL_WITH_KIND(sctx, fn_deep_equal, |
4930 | + (createQName("http://www.w3.org/2005/xpath-functions","","deep-equal"), |
4931 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4932 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4933 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4934 | + FunctionConsts::FN_DEEP_EQUAL_2); |
4935 | + |
4936 | + } |
4937 | + |
4938 | + |
4939 | + { |
4940 | + |
4941 | + |
4942 | + DECL_WITH_KIND(sctx, fn_deep_equal, |
4943 | + (createQName("http://www.w3.org/2005/xpath-functions","","deep-equal"), |
4944 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4945 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4946 | + GENV_TYPESYSTEM.STRING_TYPE_ONE, |
4947 | + GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), |
4948 | + FunctionConsts::FN_DEEP_EQUAL_3); |
4949 | + |
4950 | + } |
4951 | + |
4952 | + |
4953 | + { |
4954 | + |
4955 | + |
4956 | + DECL_WITH_KIND(sctx, fn_count, |
4957 | + (createQName("http://www.w3.org/2005/xpath-functions","","count"), |
4958 | + GENV_TYPESYSTEM.ITEM_TYPE_STAR, |
4959 | + GENV_TYPESYSTEM.INTEGER_TYPE_ONE), |
4960 | + FunctionConsts::FN_COUNT_1); |
4961 | + |
4962 | + } |
4963 | + |
4964 | + |
4965 | + { |
4966 | + |
4967 | + |
4968 | + DECL_WITH_KIND(sctx, fn_avg, |
4969 | + (createQName("http://www.w3.org/2005/xpath-functions","","avg"), |
4970 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4971 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4972 | + FunctionConsts::FN_AVG_1); |
4973 | + |
4974 | + } |
4975 | + |
4976 | + |
4977 | + { |
4978 | + |
4979 | + |
4980 | + DECL_WITH_KIND(sctx, fn_sum, |
4981 | + (createQName("http://www.w3.org/2005/xpath-functions","","sum"), |
4982 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4983 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE), |
4984 | + FunctionConsts::FN_SUM_1); |
4985 | + |
4986 | + } |
4987 | + |
4988 | + |
4989 | + { |
4990 | + |
4991 | + |
4992 | + DECL_WITH_KIND(sctx, fn_sum, |
4993 | + (createQName("http://www.w3.org/2005/xpath-functions","","sum"), |
4994 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR, |
4995 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, |
4996 | + GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION), |
4997 | + FunctionConsts::FN_SUM_2); |
4998 | + |
4999 | + } |
5000 | + |
- The fn:path functions returns a wrong result for the following doc/query:
doc.xml
<a><b/><b/></a>
fn:path( doc("doc. xml")/a/ b[2])
/"":a[2]/"":b[1]
- As far as I understood from the spec, fn:parse- xml-fragment should return true for the query
fn:parse- xml-fragment( "<alpha> abcd</alpha> <beta>abcd< /beta>" ) instance of document-node()