Merge lp:~zorba-coders/zorba/bug-1188062 into lp:zorba/queue-module

Proposed by Luis Rodriguez Gonzalez on 2013-06-17
Status: Merged
Approved by: Luis Rodriguez Gonzalez on 2013-07-17
Approved revision: 19
Merged at revision: 14
Proposed branch: lp:~zorba-coders/zorba/bug-1188062
Merge into: lp:zorba/queue-module
Diff against target: 546 lines (+181/-72)
29 files modified
src/CMakeLists.txt (+1/-1)
src/queue.xq (+60/-58)
test/ExpQueryResults/back-json1.xml.res (+1/-0)
test/ExpQueryResults/copy-json1.xml.res (+1/-0)
test/ExpQueryResults/empty-json1.xml.res (+2/-0)
test/ExpQueryResults/front-json1.xml.res (+1/-0)
test/ExpQueryResults/pop-json2.xml.res (+1/-0)
test/ExpQueryResults/pop-mix.xml.res (+1/-0)
test/ExpQueryResults/push-json1.xml.res (+1/-0)
test/ExpQueryResults/push-json2.xml.res (+1/-0)
test/ExpQueryResults/size-json1.xml.res (+2/-0)
test/Queries/back-json1.xq (+7/-0)
test/Queries/back1.xq (+2/-2)
test/Queries/copy-json1.xq (+11/-0)
test/Queries/copy1.xq (+1/-1)
test/Queries/empty-json1.xq (+20/-0)
test/Queries/empty1.xq (+1/-1)
test/Queries/front-json1.xq (+7/-0)
test/Queries/front1.xq (+2/-2)
test/Queries/pop-json2.xq (+7/-0)
test/Queries/pop-mix.xq (+9/-0)
test/Queries/pop1.xq (+2/-2)
test/Queries/pop2.xq (+2/-2)
test/Queries/push-json1.xq (+12/-0)
test/Queries/push-json2.xq (+13/-0)
test/Queries/push1.xq (+1/-1)
test/Queries/push2.xq (+1/-1)
test/Queries/size-json1.xq (+10/-0)
test/Queries/size1.xq (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1188062
Reviewer Review Type Date Requested Status
Luis Rodriguez Gonzalez Approve on 2013-07-17
Chris Hillery 2013-06-17 Approve on 2013-07-17
Review via email: mp+169946@code.launchpad.net

Commit message

Update to 3.0 module guidelines; make JSON-ready.

Description of the change

To post a comment you must log in.
Chris Hillery (ceejatec) wrote :

See the updated task description on the bug report. Also, see the updated coding guidelines for <p> and error codes.

review: Needs Fixing
lp:~zorba-coders/zorba/bug-1188062 updated on 2013-07-05
14. By Luis Rodriguez Gonzalez on 2013-06-21

added the ability to manage JSON structures and a new test case

15. By Luis Rodriguez Gonzalez on 2013-07-05

Changes to fix actual problems

Luis Rodriguez Gonzalez (kuraru) wrote :

> See the updated task description on the bug report. Also, see the updated
> coding guidelines for <p> and error codes.

Documentation and code problems fixed, please check it again.

lp:~zorba-coders/zorba/bug-1188062 updated on 2013-07-05
16. By Luis Rodriguez Gonzalez on 2013-07-05

Forgot to add the new testcases

Chris Hillery (ceejatec) wrote :

1. Error QNames should not be declared as public constants (see coding guidelines). Declare them as private variables as follows:

declare %private variable $queue:NOT-EXISTS as xs:QName := fn:QName($queue:ERR-NS, "queue:NOT-EXISTS");

2. The current XQDoc for those error QNames is pointless. Either eliminate the XQDoc entirely, or put in some meaningful comment (only for later authors of the module since it won't be part of the public API).

3. The XQDoc for all the queue functions refers to "nodes". It should now say "items" since it works for objects and arrays in addition to nodes.

review: Needs Fixing
lp:~zorba-coders/zorba/bug-1188062 updated on 2013-07-17
17. By Luis Rodriguez Gonzalez on 2013-07-10

Constants declared as private. Removed comments for private variables.

18. By Luis Rodriguez Gonzalez on 2013-07-10

All references to nodes were changed to items.

19. By Chris Hillery on 2013-07-17

Updated header comment.

Chris Hillery (ceejatec) :
review: Approve
review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1188062/+merge/169946

Stage "TestZorbaUbuntu" failed.
4 tests failed (8355 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/86/testReport/ to view the results.

lp:~zorba-coders/zorba/bug-1188062 updated on 2013-07-17
20. By Chris Hillery on 2013-07-17

Updating error URI.

Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1188062/+merge/169946

Stage "TestZorbaUbuntu" failed.
2 tests failed (8355 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/87/testReport/ to view the results.

lp:~zorba-coders/zorba/bug-1188062 updated on 2013-07-17
21. By Chris Hillery on 2013-07-17

Updated test results.

Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CMakeLists.txt'
2--- src/CMakeLists.txt 2012-02-29 09:08:58 +0000
3+++ src/CMakeLists.txt 2013-07-17 06:14:23 +0000
4@@ -15,6 +15,6 @@
5
6 ##### Queue data structure
7
8-DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/store/data-structures/queue" VERSION 1.0 FILE "queue.xq")
9+DECLARE_ZORBA_MODULE (URI "http://zorba.io/modules/queue" VERSION 1.0 FILE "queue.xq")
10
11 ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
12
13=== modified file 'src/queue.xq'
14--- src/queue.xq 2013-06-15 19:46:41 +0000
15+++ src/queue.xq 2013-07-17 06:14:23 +0000
16@@ -17,12 +17,15 @@
17 :)
18
19 (:~
20- : Implementation of queue for node items, using dynamic collections.<br />
21+ : Implementation of queue for items, using dynamic collections.<p/>
22+ :
23+ : Entries in the queue must be structured items - that is, either JSON
24+ : Objects or Arrays, or XML Nodes. <p/>
25 :
26 : @author Daniel Turcanu, Sorin Nasoi
27 : @project Zorba/Data Store/Data Structures/Queue
28 :)
29-module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
30+module namespace queue = "http://zorba.io/modules/queue";
31
32 import module namespace collections-ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
33 import module namespace collections-dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
34@@ -31,137 +34,136 @@
35 declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
36 declare option ver:module-version "1.0";
37
38-(:~
39- : Errors namespace URI.
40-:)
41-declare variable $queue:errNS as xs:string := "http://www.zorba-xquery.com/modules/store/data-structures/queue";
42+declare %private variable $queue:ERR-NS as xs:string := "http://zorba.io/modules/queue";
43
44-(:~
45- : xs:QName with namespace URI="http://www.zorba-xquery.com/modules/store/data-structures/queue" and local name "errNA"
46-:)
47-declare variable $queue:errNA as xs:QName := fn:QName($queue:errNS, "queue:errNA");
48-
49-(:~
50- : xs:QName with namespace URI="http://www.zorba-xquery.com/modules/store/data-structures/queue" and local name "errExists"
51-:)
52-declare variable $queue:errExists as xs:QName := fn:QName($queue:errNS, "queue:errExists");
53-
54-(:~
55- : Create a queue with this name. <br /> If queue exists, an error is raised.
56+declare %private variable $queue:NOT-EXISTS as xs:QName := fn:QName($queue:ERR-NS, "queue:NOT-EXISTS");
57+
58+declare %private variable $queue:EXISTS as xs:QName := fn:QName($queue:ERR-NS, "queue:EXISTS");
59+
60+(:~
61+ : Create a queue with the name given. If a queue with the given name already exists, an error is raised. <p/>
62+ :
63 : @param $name name of the new queue.
64- : @return ()
65- : @error queue:errExists if the queue identified by $name already exists.
66+ : @return an empty sequence.
67+ : @error queue:EXISTS if the queue identified by $name already exists.
68 :)
69 declare %ann:sequential function queue:create($name as xs:QName) as empty-sequence()
70 {
71 if(collections-ddl:is-available-collection($name)) then
72- fn:error($queue:errExists, "Queue already exists.");
73+ fn:error($queue:EXISTS, "Queue already exists.");
74 else
75 collections-ddl:create($name);
76 };
77
78 (:~
79- : Return the first node in the queue (the first added), without removing it.
80+ : Return the first item in the queue (the first added), without removing it. <p/>
81+ :
82 : @param $name name of the queue.
83- : @return the first node, or empty sequence if queue is empty.
84+ : @return the first item, or empty sequence if queue is empty.
85 : @example test/Queries/front1.xq
86- : @error queue:errNA if the queue identified by $name does not exist.
87+ : @error queue:NOT-EXISTS if the queue identified by $name does not exist.
88 :)
89-declare function queue:front($name as xs:QName) as node()?
90+declare function queue:front($name as xs:QName) as structured-item()?
91 {
92 if(not(collections-ddl:is-available-collection($name))) then
93- fn:error($queue:errNA, "Queue does not exist.")
94+ fn:error($queue:NOT-EXISTS, "Queue does not exist.")
95 else
96 collections-dml:collection($name)[1]
97 };
98
99 (:~
100- : Return the last node in the queue (the last added), without removing it.
101+ : Return the last item in the queue (the last added), without removing it. <p/>
102+ :
103 : @param $name name of the queue.
104- : @return the last node, or empty sequence if queue is empty.
105+ : @return the last item, or empty sequence if queue is empty.
106 : @example test/Queries/back1.xq
107- : @error queue:errNA if the queue identified by $name does not exist.
108+ : @error queue:NOT-EXISTS if the queue identified by $name does not exist.
109 :)
110-declare function queue:back($name as xs:QName) as node()?
111+declare function queue:back($name as xs:QName) as structured-item()?
112 {
113 if(not(collections-ddl:is-available-collection($name))) then
114- fn:error($queue:errNA, "Queue does not exist.")
115+ fn:error($queue:NOT-EXISTS, "Queue does not exist.")
116 else
117 collections-dml:collection($name)[fn:last()]
118 };
119
120 (:~
121- : Return the first node in the queue, and remove it.
122+ : Return the first item in the queue, and remove it. <p/>
123+ :
124 : @param $name name of the queue.
125- : @return the first node, or empty sequence if queue is empty.
126+ : @return the first item, or empty sequence if queue is empty.
127 : @example test/Queries/pop2.xq
128- : @error queue:errNA if the queue identified by $name does not exist.
129+ : @error queue:NOT-EXISTS if the queue identified by $name does not exist.
130 :)
131-declare %ann:sequential function queue:pop($name as xs:QName) as node()?
132+declare %ann:sequential function queue:pop($name as xs:QName) as structured-item()?
133 {
134 if(not(collections-ddl:is-available-collection($name))) then
135- fn:error($queue:errNA, "Queue does not exist.")
136+ fn:error($queue:NOT-EXISTS, "Queue does not exist.")
137 else
138 {
139- variable $topNode := collections-dml:collection($name)[1];
140- collections-dml:delete-node-first($name);
141- $topNode
142+ variable $topItem := collections-dml:collection($name)[1];
143+ collections-dml:delete-first($name);
144+ $topItem
145 }
146 };
147
148 (:~
149- : Add a new node to the queue; the queue will contain a copy of the given node.
150+ : Add a new item to the queue; the queue will contain a copy of the given item. <p/>
151+ :
152 : @param $name name of the queue.
153- : @param $value the node to be added.
154+ : @param $value the item to be added.
155 : @return ()
156 : @example test/Queries/push1.xq
157- : @error queue:errNA if the queue identified by $name does not exist.
158+ : @error queue:NOT-EXISTS if the queue identified by $name does not exist.
159 :)
160-declare %ann:sequential function queue:push($name as xs:QName, $value as node()) as empty-sequence()
161+declare %ann:sequential function queue:push($name as xs:QName, $value as structured-item()) as empty-sequence()
162 {
163 if(not(collections-ddl:is-available-collection($name))) then
164- fn:error($queue:errNA, "Queue does not exist.");
165+ fn:error($queue:NOT-EXISTS, "Queue does not exist.");
166 else
167- collections-dml:apply-insert-nodes-last($name, $value);
168+ collections-dml:apply-insert-last($name, $value);
169 };
170
171 (:~
172- : Checks if a queue exists and is empty.
173+ : Checks if a queue exists and is empty. <p/>
174+ :
175 : @param $name name of the queue.
176- : @return true is the queue is empty or does not exist.
177+ : @return true is the queue is empty, false if it is not empty.
178 : @example test/Queries/empty1.xq
179- : @error queue:errNA if the queue identified by $name does not exist.
180+ : @error queue:NOT-EXISTS if the queue identified by $name does not exist.
181 :)
182 declare function queue:empty($name as xs:QName) as xs:boolean
183 {
184 if(not(collections-ddl:is-available-collection($name))) then
185- fn:error($queue:errNA, "Queue does not exist.")
186+ fn:error($queue:NOT-EXISTS, "Queue does not exist.")
187 else
188 fn:empty(collections-dml:collection($name))
189 };
190
191 (:~
192- : Count of nodes in the queue.
193+ : Count of items in the queue. <p/>
194+ :
195 : @param $name name of the queue.
196- : @return the count of nodes.
197+ : @return the count of items.
198 : @example test/Queries/size1.xq
199- : @error queue:errNA if the queue identified by $name does not exist.
200+ : @error queue:NOT-EXISTS if the queue identified by $name does not exist.
201 :)
202 declare function queue:size($name as xs:QName) as xs:integer
203 {
204 if(not(collections-ddl:is-available-collection($name))) then
205- fn:error($queue:errNA, "Queue does not exist.")
206+ fn:error($queue:NOT-EXISTS, "Queue does not exist.")
207 else
208 fn:count(collections-dml:collection($name))
209 };
210
211 (:~
212- : Copy all nodes from source queue to a destination queue.<br />
213- : If destination queue does not exist, it is created first. <br />
214- : If destination queue is not empty, the nodes are appended last.
215+ : Copy all items from source queue to a destination queue. <p/>
216+ : If destination queue does not exist, it is created first. <p/>
217+ : If destination queue is not empty, the items are appended last. <p/>
218+ :
219 : @param $destName name of the destination queue.
220 : @param $sourceName name of the source queue.
221- : @return ()
222+ : @return an empty sequence.
223 : @example test/Queries/copy1.xq
224 :)
225 declare %ann:sequential function queue:copy($destName as xs:QName, $sourceName as xs:QName) as empty-sequence()
226@@ -170,5 +172,5 @@
227 collections-ddl:create($destName);
228 else
229 ();
230- collections-dml:insert-nodes-last($destName, collections-dml:collection($sourceName));
231+ collections-dml:insert-last($destName, collections-dml:collection($sourceName));
232 };
233
234=== added file 'test/ExpQueryResults/back-json1.xml.res'
235--- test/ExpQueryResults/back-json1.xml.res 1970-01-01 00:00:00 +0000
236+++ test/ExpQueryResults/back-json1.xml.res 2013-07-17 06:14:23 +0000
237@@ -0,0 +1,1 @@
238+{ "b" : 2 }
239\ No newline at end of file
240
241=== added file 'test/ExpQueryResults/copy-json1.xml.res'
242--- test/ExpQueryResults/copy-json1.xml.res 1970-01-01 00:00:00 +0000
243+++ test/ExpQueryResults/copy-json1.xml.res 2013-07-17 06:14:23 +0000
244@@ -0,0 +1,1 @@
245+{ "a" : 1 }4
246\ No newline at end of file
247
248=== added file 'test/ExpQueryResults/empty-json1.xml.res'
249--- test/ExpQueryResults/empty-json1.xml.res 1970-01-01 00:00:00 +0000
250+++ test/ExpQueryResults/empty-json1.xml.res 2013-07-17 06:14:23 +0000
251@@ -0,0 +1,2 @@
252+<?xml version="1.0" encoding="UTF-8"?>
253+false{ "a" : 1 }{ "b" : null }true
254\ No newline at end of file
255
256=== added file 'test/ExpQueryResults/front-json1.xml.res'
257--- test/ExpQueryResults/front-json1.xml.res 1970-01-01 00:00:00 +0000
258+++ test/ExpQueryResults/front-json1.xml.res 2013-07-17 06:14:23 +0000
259@@ -0,0 +1,1 @@
260+{ "a" : 1 }
261\ No newline at end of file
262
263=== added file 'test/ExpQueryResults/pop-json2.xml.res'
264--- test/ExpQueryResults/pop-json2.xml.res 1970-01-01 00:00:00 +0000
265+++ test/ExpQueryResults/pop-json2.xml.res 2013-07-17 06:14:23 +0000
266@@ -0,0 +1,1 @@
267+{ "pi" : 3.1415927 }
268\ No newline at end of file
269
270=== added file 'test/ExpQueryResults/pop-mix.xml.res'
271--- test/ExpQueryResults/pop-mix.xml.res 1970-01-01 00:00:00 +0000
272+++ test/ExpQueryResults/pop-mix.xml.res 2013-07-17 06:14:23 +0000
273@@ -0,0 +1,1 @@
274+{ "pi" : 3.1415927 }{ "e" : 2.7182818 }<a/><b/>
275\ No newline at end of file
276
277=== added file 'test/ExpQueryResults/push-json1.xml.res'
278--- test/ExpQueryResults/push-json1.xml.res 1970-01-01 00:00:00 +0000
279+++ test/ExpQueryResults/push-json1.xml.res 2013-07-17 06:14:23 +0000
280@@ -0,0 +1,1 @@
281+{ "a" : 1 }{ "b" : true }
282\ No newline at end of file
283
284=== added file 'test/ExpQueryResults/push-json2.xml.res'
285--- test/ExpQueryResults/push-json2.xml.res 1970-01-01 00:00:00 +0000
286+++ test/ExpQueryResults/push-json2.xml.res 2013-07-17 06:14:23 +0000
287@@ -0,0 +1,1 @@
288+{ "a" : 1 }{ "b" : 2.1 }{ "c" : "done" }
289\ No newline at end of file
290
291=== added file 'test/ExpQueryResults/size-json1.xml.res'
292--- test/ExpQueryResults/size-json1.xml.res 1970-01-01 00:00:00 +0000
293+++ test/ExpQueryResults/size-json1.xml.res 2013-07-17 06:14:23 +0000
294@@ -0,0 +1,2 @@
295+<?xml version="1.0" encoding="UTF-8"?>
296+3
297\ No newline at end of file
298
299=== added file 'test/Queries/back-json1.xq'
300--- test/Queries/back-json1.xq 1970-01-01 00:00:00 +0000
301+++ test/Queries/back-json1.xq 2013-07-17 06:14:23 +0000
302@@ -0,0 +1,7 @@
303+import module namespace queue = "http://zorba.io/modules/queue";
304+
305+variable $name := fn:QName("", "queue1");
306+queue:create($name);
307+queue:push($name, {"a" : 1});
308+queue:push($name, {"b" : 2});
309+queue:back($name)
310
311=== modified file 'test/Queries/back1.xq'
312--- test/Queries/back1.xq 2012-02-29 09:08:58 +0000
313+++ test/Queries/back1.xq 2013-07-17 06:14:23 +0000
314@@ -1,7 +1,7 @@
315-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
316+import module namespace queue = "http://zorba.io/modules/queue";
317
318 variable $name := fn:QName("", "queue1");
319 queue:create($name);
320 queue:push($name, <a/>);
321 queue:push($name, <b/>);
322-queue:back($name)
323\ No newline at end of file
324+queue:back($name)
325
326=== added file 'test/Queries/copy-json1.xq'
327--- test/Queries/copy-json1.xq 1970-01-01 00:00:00 +0000
328+++ test/Queries/copy-json1.xq 2013-07-17 06:14:23 +0000
329@@ -0,0 +1,11 @@
330+import module namespace queue = "http://zorba.io/modules/queue";
331+
332+variable $name := fn:QName("", "queue1");
333+variable $nameCopy := fn:QName("", "queue-copy");
334+queue:create($name);
335+queue:push($name, { "a" : 1 });
336+queue:push($name, { "b" : "hi" });
337+queue:copy($nameCopy, $name);
338+queue:push($nameCopy, { "c" : jn:null() });
339+queue:push($nameCopy, { "d" : fn:true() });
340+(queue:front($nameCopy), queue:size($nameCopy))
341
342=== modified file 'test/Queries/copy1.xq'
343--- test/Queries/copy1.xq 2012-02-29 09:08:58 +0000
344+++ test/Queries/copy1.xq 2013-07-17 06:14:23 +0000
345@@ -1,4 +1,4 @@
346-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
347+import module namespace queue = "http://zorba.io/modules/queue";
348
349 variable $name := fn:QName("", "queue1");
350 variable $nameCopy := fn:QName("", "queue-copy");
351
352=== added file 'test/Queries/empty-json1.xq'
353--- test/Queries/empty-json1.xq 1970-01-01 00:00:00 +0000
354+++ test/Queries/empty-json1.xq 2013-07-17 06:14:23 +0000
355@@ -0,0 +1,20 @@
356+import module namespace queue = "http://zorba.io/modules/queue";
357+import module namespace collections-ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
358+import module namespace collections-dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
359+
360+variable $name := fn:QName("", "queue1");
361+
362+(
363+ queue:create($name),
364+ queue:push($name, { "a" : 1 }),
365+ queue:push($name, { "b" : jn:null() }),
366+ queue:empty($name),
367+ queue:pop($name),
368+ queue:pop($name),
369+ queue:empty($name),
370+ {
371+ collections-dml:delete-first($name, queue:size($name));
372+ collections-ddl:delete($name);
373+ ()
374+ }
375+)
376
377=== modified file 'test/Queries/empty1.xq'
378--- test/Queries/empty1.xq 2012-04-18 09:42:23 +0000
379+++ test/Queries/empty1.xq 2013-07-17 06:14:23 +0000
380@@ -1,4 +1,4 @@
381-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
382+import module namespace queue = "http://zorba.io/modules/queue";
383 import module namespace collections-ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
384 import module namespace collections-dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
385
386
387=== added file 'test/Queries/front-json1.xq'
388--- test/Queries/front-json1.xq 1970-01-01 00:00:00 +0000
389+++ test/Queries/front-json1.xq 2013-07-17 06:14:23 +0000
390@@ -0,0 +1,7 @@
391+import module namespace queue = "http://zorba.io/modules/queue";
392+
393+variable $name := fn:QName("", "queue1");
394+queue:create($name);
395+queue:push($name, { "a" : 1 });
396+queue:push($name, { "b" : fn:false() });
397+queue:front($name)
398
399=== modified file 'test/Queries/front1.xq'
400--- test/Queries/front1.xq 2012-02-29 09:08:58 +0000
401+++ test/Queries/front1.xq 2013-07-17 06:14:23 +0000
402@@ -1,7 +1,7 @@
403-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
404+import module namespace queue = "http://zorba.io/modules/queue";
405
406 variable $name := fn:QName("", "queue1");
407 queue:create($name);
408 queue:push($name, <a/>);
409 queue:push($name, <b/>);
410-queue:front($name)
411\ No newline at end of file
412+queue:front($name)
413
414=== added file 'test/Queries/pop-json2.xq'
415--- test/Queries/pop-json2.xq 1970-01-01 00:00:00 +0000
416+++ test/Queries/pop-json2.xq 2013-07-17 06:14:23 +0000
417@@ -0,0 +1,7 @@
418+import module namespace queue = "http://zorba.io/modules/queue";
419+
420+variable $name := fn:QName("", "queue1");
421+queue:create($name);
422+queue:push($name, { "pi" : 3.1415927 });
423+queue:push($name, { "e" : 2.7182818 });
424+queue:pop($name)
425
426=== added file 'test/Queries/pop-mix.xq'
427--- test/Queries/pop-mix.xq 1970-01-01 00:00:00 +0000
428+++ test/Queries/pop-mix.xq 2013-07-17 06:14:23 +0000
429@@ -0,0 +1,9 @@
430+import module namespace queue = "http://zorba.io/modules/queue";
431+
432+variable $name := fn:QName("", "queue1");
433+queue:create($name);
434+queue:push($name, { "pi" : 3.1415927 });
435+queue:push($name, { "e" : 2.7182818 });
436+queue:push($name, <a/>);
437+queue:push($name, <b/>);
438+(queue:pop($name), queue:pop($name), queue:pop($name), queue:pop($name))
439
440=== modified file 'test/Queries/pop1.xq'
441--- test/Queries/pop1.xq 2012-02-29 09:08:58 +0000
442+++ test/Queries/pop1.xq 2013-07-17 06:14:23 +0000
443@@ -1,5 +1,5 @@
444-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
445+import module namespace queue = "http://zorba.io/modules/queue";
446
447 variable $name := fn:QName("", "queue1");
448 queue:create($name);
449-queue:pop($name)
450\ No newline at end of file
451+queue:pop($name)
452
453=== modified file 'test/Queries/pop2.xq'
454--- test/Queries/pop2.xq 2012-02-29 09:08:58 +0000
455+++ test/Queries/pop2.xq 2013-07-17 06:14:23 +0000
456@@ -1,7 +1,7 @@
457-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
458+import module namespace queue = "http://zorba.io/modules/queue";
459
460 variable $name := fn:QName("", "queue1");
461 queue:create($name);
462 queue:push($name, <a/>);
463 queue:push($name, <b/>);
464-queue:pop($name)
465\ No newline at end of file
466+queue:pop($name)
467
468=== added file 'test/Queries/push-json1.xq'
469--- test/Queries/push-json1.xq 1970-01-01 00:00:00 +0000
470+++ test/Queries/push-json1.xq 2013-07-17 06:14:23 +0000
471@@ -0,0 +1,12 @@
472+import module namespace queue = "http://zorba.io/modules/queue";
473+
474+variable $name := fn:QName("", "queue1");
475+(
476+ queue:create($name),
477+ queue:push($name, { "a" : 1 }),
478+ queue:push($name, { "b" : fn:true() }),
479+ queue:pop($name),
480+ queue:push($name, { "c" : jn:null() }),
481+ queue:push($name, { "d" : 1.4142 }),
482+ queue:pop($name)
483+)
484
485=== added file 'test/Queries/push-json2.xq'
486--- test/Queries/push-json2.xq 1970-01-01 00:00:00 +0000
487+++ test/Queries/push-json2.xq 2013-07-17 06:14:23 +0000
488@@ -0,0 +1,13 @@
489+import module namespace queue = "http://zorba.io/modules/queue";
490+
491+variable $name := fn:QName("", "queue1");
492+(
493+ queue:create($name),
494+ queue:push($name, { "a" : 1 }),
495+ queue:push($name, { "b" : 2.1 }),
496+ queue:pop($name),
497+ queue:push($name, { "c" : "done" }),
498+ queue:push($name, { "d" : jn:null() }),
499+ queue:pop($name),
500+ queue:pop($name)
501+)
502
503=== modified file 'test/Queries/push1.xq'
504--- test/Queries/push1.xq 2012-02-29 09:08:58 +0000
505+++ test/Queries/push1.xq 2013-07-17 06:14:23 +0000
506@@ -1,4 +1,4 @@
507-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
508+import module namespace queue = "http://zorba.io/modules/queue";
509
510 variable $name := fn:QName("", "queue1");
511 (
512
513=== modified file 'test/Queries/push2.xq'
514--- test/Queries/push2.xq 2012-03-23 07:19:21 +0000
515+++ test/Queries/push2.xq 2013-07-17 06:14:23 +0000
516@@ -1,4 +1,4 @@
517-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
518+import module namespace queue = "http://zorba.io/modules/queue";
519
520 variable $name := fn:QName("", "queue1");
521 (
522
523=== added file 'test/Queries/size-json1.xq'
524--- test/Queries/size-json1.xq 1970-01-01 00:00:00 +0000
525+++ test/Queries/size-json1.xq 2013-07-17 06:14:23 +0000
526@@ -0,0 +1,10 @@
527+import module namespace queue = "http://zorba.io/modules/queue";
528+
529+variable $name := fn:QName("", "queue1");
530+queue:create($name);
531+queue:push($name, { "a" : 1 });
532+queue:push($name, { "b" : 2.1 });
533+queue:pop($name);
534+queue:push($name, { "c" : fn:false() });
535+queue:push($name, { "d" : "sort" });
536+queue:size($name)
537
538=== modified file 'test/Queries/size1.xq'
539--- test/Queries/size1.xq 2012-02-29 09:08:58 +0000
540+++ test/Queries/size1.xq 2013-07-17 06:14:23 +0000
541@@ -1,4 +1,4 @@
542-import module namespace queue = "http://www.zorba-xquery.com/modules/store/data-structures/queue";
543+import module namespace queue = "http://zorba.io/modules/queue";
544
545 variable $name := fn:QName("", "queue1");
546 queue:create($name);

Subscribers

People subscribed via source and target branches

to all changes: