This module is part of Zorba's XQuery Data Definition Facility. All the collections managed by this module have to be pre-declared in the prolog of a module. Please refer to the general documentation for more information and examples.
apply-insert-after
($name as xs:QName, $pos as item(), $content as item()*) as item()* external
This function does the same thing as the insert-after() function except it immediately applies the resulting pending updates and returns the items that have been inserted. |
apply-insert-before
($name as xs:QName, $target as item(), $content as item()*) as item()* external
This function does the same thing as insert-before() except it immediately applies the resulting pending updates and returns the items that have been inserted. |
apply-insert-first
($name as xs:QName, $content as item()*) as item()* external
This function does the same thing as insert-first() except it immediately applies the resulting pending updates and returns the items that have been inserted. |
apply-insert-last
($name as xs:QName, $content as item()*) as item()* external
This function does the same thing as insert-last() except it immediately applies the resulting pending updates and returns the items that have been inserted. |
apply-insert
($name as xs:QName, $content as item()*) as item()* external
This function does the same thing as insert() except it immediately applies the resulting pending updates and returns the items that have been inserted. |
collection-name
($item as item()) as xs:QName external
Gets the name of the collection the given item (node or JSON item) belongs to. |
collection
($name as xs:QName) as item()* external
Gets the sequence of nodes or JSON items from a collection. |
collection
($name as xs:QName, $skip as xs:integer) as item()* external
Gets the sequence of nodes or JSON items from a collection. |
collection
($name as xs:QName, $start as xs:anyURI, $skip as xs:integer) as item()* external
Gets the sequence of items (nodes or JSON items) from a collection. |
delete-first
($name as xs:QName) external
Deletes the first item from a collection. |
delete-first
($name as xs:QName, $number as xs:integer) external
Deletes the first N items from a collection. |
delete-last
($name as xs:QName) external
Deletes the last item from a collection. |
delete-last
($name as xs:QName, $number as xs:integer) external
Deletes the last N items from a collection. |
delete
($items as item()*) external
Deletes items (nodes or JSON items) from a collection. |
edit
($target as item(), $content as item()) external
Edits the first supplied item so as to make it look exactly like a copy of the second supplied item while retaining its original identity. |
index-of
($item as item()) as xs:integer external
Gets the position of the given item (node or JSON item) within its collection. |
insert-after
($name as xs:QName, $target as item(), $content as item()*) external
The insert-after function is an updating function that inserts copies of the given items (nodes or JSON items) into a collection at the position directly following the given target item. |
insert-before
($name as xs:QName, $target as item(), $content as item()*) external
Inserts copies of the given items (nodes or JSON items) into a collection at the position directly preceding the given target item. |
insert-first
($name as xs:QName, $content as item()*) external
Inserts copies of the given items (nodes or JSON items) at the beginning of a collection. |
insert-last
($name as xs:QName, $content as item()*) external
Inserts copies of the given items (nodes or JSON items) at the end of a collection. |
insert
($name as xs:QName, $content as item()*) external
Inserts copies of the given items (nodes or JSON items) into a collection. |
truncate
($name as xs:QName) external
Deletes the entire contents of collection. |
declare %an:sequential function cdml:apply-insert-after($name as xs:QName, $pos as item(), $content as item()*) as item()* external
insert-after()
function except it immediately applies the resulting pending updates and
returns the items that have been inserted.
declare %an:sequential function cdml:apply-insert-before($name as xs:QName, $target as item(), $content as item()*) as item()* external
insert-before()
except it
immediately applies the resulting pending updates and returns the items that
have been inserted.
$content
will be inserted.declare %an:sequential function cdml:apply-insert-first($name as xs:QName, $content as item()*) as item()* external
insert-first()
except it
immediately applies the resulting pending updates and returns the items that
have been inserted.
declare %an:sequential function cdml:apply-insert-last($name as xs:QName, $content as item()*) as item()* external
insert-last()
except it
immediately applies the resulting pending updates and returns the items that
have been inserted.
declare %an:sequential function cdml:apply-insert($name as xs:QName, $content as item()*) as item()* external
insert()
except it
immediately applies the resulting pending updates and returns the items that
have been inserted.
declare function cdml:collection-name($item as item()) as xs:QName external
declare function cdml:collection($name as xs:QName) as item()* external
declare function cdml:collection($name as xs:QName, $skip as xs:integer) as item()* external
declare function cdml:collection($name as xs:QName, $start as xs:anyURI, $skip as xs:integer) as item()* external
$start
and $skip
can be used to
skip over some items at the beginning of the collection.
If both are given, both are applied:
first $start
to skip to the referenced item
and then $skip
to skip that additional number of items.
declare function cdml:delete-first($name as xs:QName) external
declare function cdml:delete-first($name as xs:QName, $number as xs:integer) external
declare function cdml:delete-last($name as xs:QName) external
declare function cdml:delete-last($name as xs:QName, $number as xs:integer) external
declare function cdml:delete($items as item()*) external
declare function cdml:edit($target as item(), $content as item()) external
declare function cdml:index-of($item as item()) as xs:integer external
$item
in its collection.declare function cdml:insert-after($name as xs:QName, $target as item(), $content as item()*) external
$content
will be inserted.declare function cdml:insert-before($name as xs:QName, $target as item(), $content as item()*) external
$content
will be inserted.declare function cdml:insert-first($name as xs:QName, $content as item()*) external
declare function cdml:insert-last($name as xs:QName, $content as item()*) external
declare function cdml:insert($name as xs:QName, $content as item()*) external
declare function cdml:truncate($name as xs:QName) external