1 /*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #include "stdafx.h"
17
18 #include "pul_primitive_factory.h"
19 #include "pul_primitives.h"
20
21 namespace zorba { namespace simplestore {
22
23
24 /***************************************************************************
25
26 ***************************************************************************/
27 UpdDelete*
createUpdDelete(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target)28 PULPrimitiveFactory::createUpdDelete(
29 CollectionPul* pul,
30 const QueryLoc* aLoc,
31 store::Item_t& target)
32 {
33 return new UpdDelete(pul, aLoc, target);
34 }
35
36
37 /***************************************************************************
38
39 ***************************************************************************/
40 UpdInsertChildren*
createUpdInsertChildren(CollectionPul * pul,const QueryLoc * aLoc,store::UpdateConsts::UpdPrimKind kind,store::Item_t & target,store::Item_t & sibling,std::vector<store::Item_t> & children)41 PULPrimitiveFactory::createUpdInsertChildren(
42 CollectionPul* pul,
43 const QueryLoc* aLoc,
44 store::UpdateConsts::UpdPrimKind kind,
45 store::Item_t& target,
46 store::Item_t& sibling,
47 std::vector<store::Item_t>& children)
48 {
49 return new UpdInsertChildren(pul, aLoc, kind, target, sibling, children);
50 }
51
52
53 /***************************************************************************
54
55 ****************************************************************************/
56 UpdInsertAttributes*
createUpdInsertAttributes(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,std::vector<store::Item_t> & attrs)57 PULPrimitiveFactory::createUpdInsertAttributes(
58 CollectionPul* pul,
59 const QueryLoc* aLoc,
60 store::Item_t& target,
61 std::vector<store::Item_t>& attrs)
62 {
63 return new UpdInsertAttributes(pul, aLoc, target, attrs);
64 }
65
66
67 /***************************************************************************
68
69 ****************************************************************************/
70 UpdReplaceAttribute*
createUpdReplaceAttribute(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & attr,std::vector<store::Item_t> & newAttrs)71 PULPrimitiveFactory::createUpdReplaceAttribute(
72 CollectionPul* pul,
73 const QueryLoc* aLoc,
74 store::Item_t& target,
75 store::Item_t& attr,
76 std::vector<store::Item_t>& newAttrs)
77 {
78 return new UpdReplaceAttribute(pul, aLoc, target, attr, newAttrs);
79 }
80
81
82 /***************************************************************************
83
84 ****************************************************************************/
85 UpdReplaceChild*
createUpdReplaceChild(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & child,std::vector<store::Item_t> & newChildren)86 PULPrimitiveFactory::createUpdReplaceChild(
87 CollectionPul* pul,
88 const QueryLoc* aLoc,
89 store::Item_t& target,
90 store::Item_t& child,
91 std::vector<store::Item_t>& newChildren)
92 {
93 return new UpdReplaceChild(pul, aLoc, target, child, newChildren);
94 }
95
96
97 /***************************************************************************
98
99 ****************************************************************************/
100 UpdReplaceElemContent*
createUpdReplaceElemContent(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & newChild)101 PULPrimitiveFactory::createUpdReplaceElemContent(
102 CollectionPul* pul,
103 const QueryLoc* aLoc,
104 store::Item_t& target,
105 store::Item_t& newChild)
106 {
107 return new UpdReplaceElemContent(pul, aLoc, target, newChild);
108 }
109
110
111 /***************************************************************************
112
113 ****************************************************************************/
114 UpdRenameElem*
createUpdRenameElem(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & newName)115 PULPrimitiveFactory::createUpdRenameElem(
116 CollectionPul* pul,
117 const QueryLoc* aLoc,
118 store::Item_t& target,
119 store::Item_t& newName)
120 {
121 return new UpdRenameElem(pul, aLoc, target, newName);
122 }
123
124
125 /***************************************************************************
126
127 ****************************************************************************/
createUpdReplaceAttrValue(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,zstring & newValue)128 UpdReplaceAttrValue* PULPrimitiveFactory::createUpdReplaceAttrValue(
129 CollectionPul* pul,
130 const QueryLoc* aLoc,
131 store::Item_t& target,
132 zstring& newValue)
133 {
134 return new UpdReplaceAttrValue(pul, aLoc, target, newValue);
135 }
136
137
138 /***************************************************************************
139
140 ****************************************************************************/
createUpdRenameAttr(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & newName)141 UpdRenameAttr* PULPrimitiveFactory::createUpdRenameAttr(
142 CollectionPul* pul,
143 const QueryLoc* aLoc,
144 store::Item_t& target,
145 store::Item_t& newName)
146 {
147 return new UpdRenameAttr(pul, aLoc, target, newName);
148 }
149
150
151 /***************************************************************************
152
153 ****************************************************************************/
createUpdReplaceTextValue(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,zstring & newValue)154 UpdReplaceTextValue* PULPrimitiveFactory::createUpdReplaceTextValue(
155 CollectionPul* pul,
156 const QueryLoc* aLoc,
157 store::Item_t& target,
158 zstring& newValue)
159 {
160 return new UpdReplaceTextValue(pul, aLoc, target, newValue);
161 }
162
163
164 /***************************************************************************
165
166 ****************************************************************************/
createUpdReplacePiValue(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,zstring & newValue)167 UpdReplacePiValue* PULPrimitiveFactory::createUpdReplacePiValue(
168 CollectionPul* pul,
169 const QueryLoc* aLoc,
170 store::Item_t& target,
171 zstring& newValue)
172 {
173 return new UpdReplacePiValue(pul, aLoc, target, newValue);
174 }
175
176
177 /***************************************************************************
178
179 ****************************************************************************/
180 UpdRenamePi*
createUpdRenamePi(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,zstring & newName)181 PULPrimitiveFactory::createUpdRenamePi(
182 CollectionPul* pul,
183 const QueryLoc* aLoc,
184 store::Item_t& target,
185 zstring& newName)
186 {
187 return new UpdRenamePi(pul, aLoc, target, newName);
188 }
189
190
191 /***************************************************************************
192
193 ***************************************************************************/
194 UpdReplaceCommentValue*
createUpdReplaceCommentValue(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & target,zstring & newValue)195 PULPrimitiveFactory::createUpdReplaceCommentValue(
196 CollectionPul* pul,
197 const QueryLoc* aLoc,
198 store::Item_t& target,
199 zstring& newValue)
200 {
201 return new UpdReplaceCommentValue(pul, aLoc, target, newValue);
202 }
203
204
205 /***************************************************************************
206
207 ***************************************************************************/
208 UpdSetElementType*
createUpdSetElementType(PULImpl * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & typeName,store::Item_t & typedValue,bool haveValue,bool haveEmptyValue,bool haveTypedValue,bool haveListValue,bool isInSubstitutionGroup)209 PULPrimitiveFactory::createUpdSetElementType(
210 PULImpl* pul,
211 const QueryLoc* aLoc,
212 store::Item_t& target,
213 store::Item_t& typeName,
214 store::Item_t& typedValue,
215 bool haveValue,
216 bool haveEmptyValue,
217 bool haveTypedValue,
218 bool haveListValue,
219 bool isInSubstitutionGroup)
220 {
221 return new UpdSetElementType(pul, aLoc, target, typeName, typedValue,
222 haveValue, haveEmptyValue, haveTypedValue, haveListValue,
223 isInSubstitutionGroup);
224 }
225
226
227 /***************************************************************************
228
229 ***************************************************************************/
230 UpdSetAttributeType*
createUpdSetAttributeType(PULImpl * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & typeName,store::Item_t & typedValue,bool haveListValue)231 PULPrimitiveFactory::createUpdSetAttributeType(
232 PULImpl* pul,
233 const QueryLoc* aLoc,
234 store::Item_t& target,
235 store::Item_t& typeName,
236 store::Item_t& typedValue,
237 bool haveListValue)
238 {
239 return new UpdSetAttributeType(pul, aLoc, target, typeName, typedValue, haveListValue);
240 }
241
242
243 /***************************************************************************
244
245 ****************************************************************************/
246 UpdRevalidate*
createUpdRevalidate(PULImpl * pul,const QueryLoc * aLoc,store::Item_t & target)247 PULPrimitiveFactory::createUpdRevalidate(
248 PULImpl* pul,
249 const QueryLoc* aLoc,
250 store::Item_t& target)
251 {
252 return new UpdRevalidate(pul, aLoc, target);
253 }
254
255
256 /***************************************************************************
257
258 ****************************************************************************/
259 UpdPut*
createUpdPut(PULImpl * pul,const QueryLoc * aLoc,store::Item_t & target,store::Item_t & uri)260 PULPrimitiveFactory::createUpdPut(
261 PULImpl* pul,
262 const QueryLoc* aLoc,
263 store::Item_t& target,
264 store::Item_t& uri)
265 {
266 return new UpdPut(pul, aLoc, target, uri);
267 }
268
269
270 /***************************************************************************
271
272 ****************************************************************************/
273 UpdCreateCollection*
createUpdCreateCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,const std::vector<store::Annotation_t> & annotations,const store::Item_t & nodeType,bool isDynamic)274 PULPrimitiveFactory::createUpdCreateCollection(
275 CollectionPul* pul,
276 const QueryLoc* aLoc,
277 store::Item_t& name,
278 const std::vector<store::Annotation_t>& annotations,
279 const store::Item_t& nodeType,
280 bool isDynamic)
281 {
282 return new UpdCreateCollection(pul,
283 aLoc,
284 name,
285 annotations,
286 nodeType,
287 isDynamic);
288 }
289
290
291 /***************************************************************************
292
293 ****************************************************************************/
294 UpdDeleteCollection*
createUpdDeleteCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,bool isDynamic)295 PULPrimitiveFactory::createUpdDeleteCollection(
296 CollectionPul* pul,
297 const QueryLoc* aLoc,
298 store::Item_t& name,
299 bool isDynamic)
300 {
301 return new UpdDeleteCollection(pul, aLoc, name, isDynamic);
302 }
303
304
305 /***************************************************************************
306
307 ****************************************************************************/
308 UpdInsertIntoCollection*
createUpdInsertIntoCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,std::vector<store::Item_t> & nodes,bool isDynamic)309 PULPrimitiveFactory::createUpdInsertIntoCollection(
310 CollectionPul* pul,
311 const QueryLoc* aLoc,
312 store::Item_t& name,
313 std::vector<store::Item_t>& nodes,
314 bool isDynamic)
315 {
316 return new UpdInsertIntoCollection(pul, aLoc, name, nodes, isDynamic);
317 }
318
319
320 /***************************************************************************
321
322 ****************************************************************************/
323 UpdInsertFirstIntoCollection*
createUpdInsertFirstIntoCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,std::vector<store::Item_t> & nodes,bool isDynamic)324 PULPrimitiveFactory::createUpdInsertFirstIntoCollection(
325 CollectionPul* pul,
326 const QueryLoc* aLoc,
327 store::Item_t& name,
328 std::vector<store::Item_t>& nodes,
329 bool isDynamic)
330 {
331 return new UpdInsertFirstIntoCollection(pul, aLoc, name, nodes, isDynamic);
332 }
333
334
335 /***************************************************************************
336 ****************************************************************************/
337 UpdInsertLastIntoCollection*
createUpdInsertLastIntoCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,std::vector<store::Item_t> & nodes,bool isDynamic)338 PULPrimitiveFactory::createUpdInsertLastIntoCollection(
339 CollectionPul* pul,
340 const QueryLoc* aLoc,
341 store::Item_t& name,
342 std::vector<store::Item_t>& nodes,
343 bool isDynamic)
344 {
345 return new UpdInsertLastIntoCollection(pul, aLoc, name, nodes, isDynamic);
346 }
347
348
349 /***************************************************************************
350 ****************************************************************************/
351 UpdInsertBeforeIntoCollection*
createUpdInsertBeforeIntoCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,store::Item_t & target,std::vector<store::Item_t> & nodes,bool isDynamic)352 PULPrimitiveFactory::createUpdInsertBeforeIntoCollection(
353 CollectionPul* pul,
354 const QueryLoc* aLoc,
355 store::Item_t& name,
356 store::Item_t& target,
357 std::vector<store::Item_t>& nodes,
358 bool isDynamic)
359 {
360 return new UpdInsertBeforeIntoCollection(pul, aLoc, name, target, nodes, isDynamic);
361 }
362
363
364 /***************************************************************************
365
366 ****************************************************************************/
367 UpdInsertAfterIntoCollection*
createUpdInsertAfterIntoCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,store::Item_t & target,std::vector<store::Item_t> & nodes,bool isDynamic)368 PULPrimitiveFactory::createUpdInsertAfterIntoCollection(
369 CollectionPul* pul,
370 const QueryLoc* aLoc,
371 store::Item_t& name,
372 store::Item_t& target,
373 std::vector<store::Item_t>& nodes,
374 bool isDynamic)
375 {
376 return new UpdInsertAfterIntoCollection(pul, aLoc, name, target, nodes, isDynamic);
377 }
378
379
380 /***************************************************************************
381
382 ****************************************************************************/
383 UpdDeleteNodesFromCollection*
createUpdDeleteNodesFromCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,std::vector<store::Item_t> & nodes,bool isLast,bool isDynamic)384 PULPrimitiveFactory::createUpdDeleteNodesFromCollection(
385 CollectionPul* pul,
386 const QueryLoc* aLoc,
387 store::Item_t& name,
388 std::vector<store::Item_t>& nodes,
389 bool isLast,
390 bool isDynamic)
391 {
392 return new UpdDeleteNodesFromCollection(pul, aLoc, name, nodes, isLast, isDynamic);
393 }
394
395
396 /***************************************************************************
397
398 ****************************************************************************/
399 UpdTruncateCollection*
createUpdTruncateCollection(CollectionPul * pul,const QueryLoc * aLoc,store::Item_t & name,bool isDynamic)400 PULPrimitiveFactory::createUpdTruncateCollection(
401 CollectionPul* pul,
402 const QueryLoc* aLoc,
403 store::Item_t& name,
404 bool isDynamic)
405 {
406 return new UpdTruncateCollection(pul, aLoc, name, isDynamic);
407 }
408
409
410 /***************************************************************************
411 ****************************************************************************/
412 UpdCreateIndex*
createUpdCreateIndex(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & qname,const store::IndexSpecification & spec,store::Iterator * sourceIter)413 PULPrimitiveFactory::createUpdCreateIndex(
414 PULImpl* pul,
415 const QueryLoc* aLoc,
416 const store::Item_t& qname,
417 const store::IndexSpecification& spec,
418 store::Iterator* sourceIter)
419 {
420 return new UpdCreateIndex(pul, aLoc, qname, spec, sourceIter);
421 }
422
423
424 /***************************************************************************
425 ****************************************************************************/
426 UpdDeleteIndex*
createUpdDeleteIndex(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & qname)427 PULPrimitiveFactory::createUpdDeleteIndex(
428 PULImpl* pul,
429 const QueryLoc* aLoc,
430 const store::Item_t& qname)
431 {
432 return new UpdDeleteIndex(pul, aLoc, qname);
433 }
434
435
436 /***************************************************************************
437
438 ****************************************************************************/
439 UpdRefreshIndex*
createUpdRefreshIndex(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & qname,store::Iterator * sourceIter)440 PULPrimitiveFactory::createUpdRefreshIndex(
441 PULImpl* pul,
442 const QueryLoc* aLoc,
443 const store::Item_t& qname,
444 store::Iterator* sourceIter)
445 {
446 return new UpdRefreshIndex(pul, aLoc, qname, sourceIter);
447 }
448
449
450 /***************************************************************************
451
452 ****************************************************************************/
453 UpdActivateIC*
createUpdActivateIC(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & aQName,const store::Item_t & aCollectionName)454 PULPrimitiveFactory::createUpdActivateIC(
455 PULImpl* pul,
456 const QueryLoc* aLoc,
457 const store::Item_t& aQName,
458 const store::Item_t& aCollectionName)
459 {
460 return new UpdActivateIC(pul, aLoc, aQName, aCollectionName);
461 }
462
463
464 /***************************************************************************
465
466 ****************************************************************************/
467 UpdActivateForeignKeyIC*
createUpdActivateForeignKeyIC(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & qQName,const store::Item_t & aFromCollectionName,const store::Item_t & aToCollectionName)468 PULPrimitiveFactory::createUpdActivateForeignKeyIC(
469 PULImpl* pul,
470 const QueryLoc* aLoc,
471 const store::Item_t& qQName,
472 const store::Item_t& aFromCollectionName,
473 const store::Item_t& aToCollectionName)
474 {
475 return new UpdActivateForeignKeyIC(pul, aLoc, qQName, aFromCollectionName, aToCollectionName);
476 }
477
478
479 /***************************************************************************
480
481 ****************************************************************************/
482 UpdDeActivateIC*
createUpdDeActivateIC(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & qname)483 PULPrimitiveFactory::createUpdDeActivateIC(
484 PULImpl* pul,
485 const QueryLoc* aLoc,
486 const store::Item_t& qname)
487 {
488 return new UpdDeActivateIC(pul, aLoc, qname);
489 }
490
491
492 /***************************************************************************
493
494 ****************************************************************************/
495 UpdCreateDocument*
createUpdCreateDocument(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & uri,store::Item_t & doc)496 PULPrimitiveFactory::createUpdCreateDocument(
497 PULImpl* pul,
498 const QueryLoc* aLoc,
499 const store::Item_t& uri,
500 store::Item_t& doc)
501 {
502 return new UpdCreateDocument(pul, aLoc, uri, doc);
503 }
504
505
506 /***************************************************************************
507
508 ****************************************************************************/
509 UpdDeleteDocument*
createUpdDeleteDocument(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & uri)510 PULPrimitiveFactory::createUpdDeleteDocument(
511 PULImpl* pul,
512 const QueryLoc* aLoc,
513 const store::Item_t& uri)
514 {
515 return new UpdDeleteDocument(pul, aLoc, uri);
516 }
517
518
519 /***************************************************************************
520
521 ****************************************************************************/
522 UpdCreateHashMap*
createUpdCreateHashMap(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & aQName,const std::vector<store::Item_t> & aKeyTypes,const std::vector<zstring> & aCollations,long aTimezone)523 PULPrimitiveFactory::createUpdCreateHashMap(
524 PULImpl* pul,
525 const QueryLoc* aLoc,
526 const store::Item_t& aQName,
527 const std::vector<store::Item_t>& aKeyTypes,
528 const std::vector<zstring>& aCollations,
529 long aTimezone)
530 {
531 return new UpdCreateHashMap(pul, aLoc, aQName, aKeyTypes, aCollations, aTimezone);
532 }
533
534
535 /***************************************************************************
536
537 ****************************************************************************/
538 UpdDestroyHashMap*
createUpdDestroyHashMap(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & aQName)539 PULPrimitiveFactory::createUpdDestroyHashMap(
540 PULImpl* pul,
541 const QueryLoc* aLoc,
542 const store::Item_t& aQName)
543 {
544 return new UpdDestroyHashMap(pul, aLoc, aQName);
545 }
546
547
548 /******************************************************************************
549
550 *******************************************************************************/
551 UpdInsertIntoHashMap*
createUpdInsertIntoHashMap(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & aQName,const std::vector<store::Item_t> & aKey,const store::Iterator_t & aValue)552 PULPrimitiveFactory::createUpdInsertIntoHashMap(
553 PULImpl* pul,
554 const QueryLoc* aLoc,
555 const store::Item_t& aQName,
556 const std::vector<store::Item_t>& aKey,
557 const store::Iterator_t& aValue)
558 {
559 return new UpdInsertIntoHashMap(pul, aLoc, aQName, aKey, aValue);
560 }
561
562
563 /******************************************************************************
564
565 *******************************************************************************/
566 UpdRemoveFromHashMap*
createUpdRemoveFromHashMap(PULImpl * pul,const QueryLoc * aLoc,const store::Item_t & aQName,const std::vector<store::Item_t> & aKey)567 PULPrimitiveFactory::createUpdRemoveFromHashMap(
568 PULImpl* pul,
569 const QueryLoc* aLoc,
570 const store::Item_t& aQName,
571 const std::vector<store::Item_t>& aKey)
572 {
573 return new UpdRemoveFromHashMap(pul, aLoc, aQName, aKey);
574 }
575
576
577 #ifdef ZORBA_WITH_JSON
578 /******************************************************************************
579
580 *******************************************************************************/
581 UpdJSONObjectInsert*
createUpdJSONObjectInsert(CollectionPul * pul,const QueryLoc * loc,store::Item_t & object,std::vector<store::Item_t> & names,std::vector<store::Item_t> & values)582 PULPrimitiveFactory::createUpdJSONObjectInsert(
583 CollectionPul* pul,
584 const QueryLoc* loc,
585 store::Item_t& object,
586 std::vector<store::Item_t>& names,
587 std::vector<store::Item_t>& values)
588 {
589 return new UpdJSONObjectInsert(pul, loc, object, names, values);
590 }
591
592
593 /******************************************************************************
594
595 *******************************************************************************/
596 UpdJSONObjectDelete*
createUpdJSONObjectDelete(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,store::Item_t & name)597 PULPrimitiveFactory::createUpdJSONObjectDelete(
598 CollectionPul* pul,
599 const QueryLoc* loc,
600 store::Item_t& target,
601 store::Item_t& name)
602 {
603 return new UpdJSONObjectDelete(pul, loc, target, name);
604 }
605
606
607 /******************************************************************************
608
609 *******************************************************************************/
610 UpdJSONObjectReplaceValue*
createUpdJSONObjectReplaceValue(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,store::Item_t & name,store::Item_t & newValue)611 PULPrimitiveFactory::createUpdJSONObjectReplaceValue(
612 CollectionPul* pul,
613 const QueryLoc* loc,
614 store::Item_t& target,
615 store::Item_t& name,
616 store::Item_t& newValue)
617 {
618 return new UpdJSONObjectReplaceValue(pul, loc, target, name, newValue);
619 }
620
621
622 /******************************************************************************
623
624 *******************************************************************************/
625 UpdJSONObjectRename*
createUpdJSONObjectRename(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,store::Item_t & name,store::Item_t & newName)626 PULPrimitiveFactory::createUpdJSONObjectRename(
627 CollectionPul* pul,
628 const QueryLoc* loc,
629 store::Item_t& target,
630 store::Item_t& name,
631 store::Item_t& newName)
632 {
633 return new UpdJSONObjectRename(pul, loc, target, name, newName);
634 }
635
636
637 /******************************************************************************
638
639 *******************************************************************************/
640 UpdJSONArrayInsert*
createUpdJSONArrayInsert(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,xs_integer & pos,std::vector<store::Item_t> & members)641 PULPrimitiveFactory::createUpdJSONArrayInsert(
642 CollectionPul* pul,
643 const QueryLoc* loc,
644 store::Item_t& target,
645 xs_integer& pos,
646 std::vector<store::Item_t>& members)
647 {
648 return new UpdJSONArrayInsert(pul, loc, target, pos, members);
649 }
650
651
652 /******************************************************************************
653
654 *******************************************************************************/
655 UpdJSONArrayAppend*
createUpdJSONArrayAppend(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,std::vector<store::Item_t> & members)656 PULPrimitiveFactory::createUpdJSONArrayAppend(
657 CollectionPul* pul,
658 const QueryLoc* loc,
659 store::Item_t& target,
660 std::vector<store::Item_t>& members)
661 {
662 return new UpdJSONArrayAppend(pul, loc, target, members);
663 }
664
665
666 /******************************************************************************
667
668 *******************************************************************************/
669 UpdJSONArrayDelete*
createUpdJSONArrayDelete(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,xs_integer & pos)670 PULPrimitiveFactory::createUpdJSONArrayDelete(
671 CollectionPul* pul,
672 const QueryLoc* loc,
673 store::Item_t& target,
674 xs_integer& pos)
675 {
676 return new UpdJSONArrayDelete(pul, loc, target, pos);
677 }
678
679
680 /******************************************************************************
681
682 *******************************************************************************/
683 UpdJSONArrayReplaceValue*
createUpdJSONArrayReplaceValue(CollectionPul * pul,const QueryLoc * loc,store::Item_t & target,xs_integer & pos,store::Item_t & newValue)684 PULPrimitiveFactory::createUpdJSONArrayReplaceValue(
685 CollectionPul* pul,
686 const QueryLoc* loc,
687 store::Item_t& target,
688 xs_integer& pos,
689 store::Item_t& newValue)
690 {
691 return new UpdJSONArrayReplaceValue(pul, loc, target, pos, newValue);
692 }
693
694 #endif
695
696 } /* namespace simplestore */ } /* namespace zorba */
697 /* vim:set et sw=2 ts=2: */
698