- All Modules
- All Functions
-
www.w3.org
- 2005
- XDM
- store
- introspection
- reflection
- external
-
xqdoc
-
project_xqdoc
-
xqdoc
(E)
- xqdoc2xhtml
-
project_xqdoc
- data processing
- expath.org
- www.functx.com
- error
http://www.zorba-xquery.com/modules/store/static/collections/ddl
import module namespace cddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
This modules defines a set of functions for managing collections which are declared in the prolog of a module. For example, it provides functions to create, delete, or introspect collections.
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.
Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis
xquery version "3.0" encoding "utf-8";
- the XQuery module can be found here.
For more details please also see:
- Data Lifecycle
- XQuery Data Definition Facility
- http://www.zorba-xquery.com/modules/store/static/collections/dml
- http://www.zorba-xquery.com/modules/store/static/indexes/ddl
- http://www.zorba-xquery.com/modules/store/static/indexes/dml
- http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl
- http://www.zorba-xquery.com/modules/store/static/integrity_constraints/dml
- http://www.zorba-xquery.com/errors
cddl | http://www.zorba-xquery.com/modules/store/static/collections/ddl |
ver | http://www.zorba-xquery.com/options/versioning |
zerr | http://www.zorba-xquery.com/errors |
![]() |
available-collections
(
) as xs:QName* external The function returns a sequence of QNames of the collections that are statically declared and available. |
![]() ![]() |
create
(
$name as xs:QName
) external The create function is an updating function which creates the collection with the given expanded QName. |
![]() ![]() |
create
(
$name as xs:QName,
$content as node()*
) external The create function is an updating function which creates the collection with the given expanded QName. |
![]() |
declared-collections
(
) as xs:QName* external The function returns a sequence of QNames representing the collections that have been declared in the prolog of the static context. |
![]() ![]() |
delete
(
$name as xs:QName
) external The delete function is an updating function that deletes the collection with the given expanded QName. |
![]() |
is-available-collection
(
$name as xs:QName
) as xs:boolean external The function returns true if a collection with the given QName is statically declared and available (i. |
![]() |
is-declared-collection
(
$name as xs:QName
) as xs:boolean external The function returns true if a collection with the given QName is declared in the prolog of the static context. |
declare function cddl:available-collections ( ) as xs:QName* external
The function returns a sequence of QNames of the collections that are statically declared and available. The sequence will be empty if there are no such collections.
- A sequence of QNames, one for each statically declared and available collection, or an emtpy sequence.
declare updating function cddl:create (
$name as xs:QName
) external
The create function is an updating function which creates the collection with the given expanded QName.
- $name The QName of the collection to create.
- The result of the function is an empty XDM instance and a pending update list which, once applied, creates a collection with the given name.
- zerr:ZDDY0001 if the expanded QName $name is not equal to any of the declared collections in the static context.
- zerr:ZDDY0002 if a collection with the given expanded QName already exists.
declare updating function cddl:create ( $name as xs:QName, $content as node()* ) external
The create function is an updating function which creates the collection with the given expanded QName. Moreover, it adds copies of the sequence $content to the new collection.
- $name The QName of the collection to create.
- $content The sequences of nodes that should be added to the new collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, creates a collection with the given name and inserts the given nodes into it.
- zerr:ZDDY0001 if the expanded QName $name is not equal to any of the declared collections in the static context.
- zerr:ZDDY0002 if a collection with the given expanded QName already exists.
- zerr:ZDTY0001 if $content does not match the expected type (i.e. declared by the collection) according to the rules for SequenceType Matching.
declare function cddl:declared-collections ( ) as xs:QName* external
The function returns a sequence of QNames representing the collections that have been declared in the prolog of the static context.
- A sequence of QNames, one for each created collection, or an emtpy sequence.
declare updating function cddl:delete (
$name as xs:QName
) external
The delete function is an updating function that deletes the collection with the given expanded QName.
- $name The QName of the collection to delete.
- The result of the function is an empty XDM instance and a pending update list which, once applied, deletes the collection with the given name.
- zerr:ZDDY0001 if the expanded QName $name is not equal to any of the declared collections in the static context.
- zerr:ZDDY0003 if the expanded QName $name is not equal to any of the available collections.
- zerr:ZDDY0015 if any of the in-scope variables references a node that belongs to the collection with QName $name.
- zerr:ZDDY0013 if the domain or key expression of any of the available indexes access the collection with name $name.
declare function cddl:is-available-collection (
$name as xs:QName
) as xs:boolean external
The function returns true if a collection with the given QName is statically declared and available (i.e. has been created).
- $name The QName of the collection that is being checked.
- true if the collection is statically declared and available, false otherwise.
declare function cddl:is-declared-collection (
$name as xs:QName
) as xs:boolean external
The function returns true if a collection with the given QName is declared in the prolog of the static context.
- $name The QName of the collection that is being checked.
- true if the collection is declared or false otherwise.