http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl

Description

Before using any of the functions below please remember to import the module namespace:

import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
This modules defines a set of functions for managing persistent, ordered, and updatable collections.

Please refer to our documentation for more information about the lifecycle management and the manipulation of such collections.

See also

Data Lifecycle

http://www.zorba-xquery.com/modules/store/dynamic/collections/dml

http://www.zorba-xquery.com/errors

Author

Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis

XQuery version and encoding

xquery version "3.0" encoding "utf-8";

Namespaces

ddlhttp://www.zorba-xquery.com/modules/store/dynamic/collections/ddl
verhttp://www.zorba-xquery.com/options/versioning
zerrhttp://www.zorba-xquery.com/errors

Function Summary

 available-collections() as xs:QName* external

The function returns a sequence of QNames of the collections that are 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 item()*) external

The create function is an updating function which creates the collection with the given expanded QName.

  delete($coll as xs:QName) external

The delete function is an updating function that removes 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 available.

Functions

available-collections#0

declare function ddl:available-collections() as xs:QName* external

The function returns a sequence of QNames of the collections that are available. The sequence will be empty if there are no collections.

Returns

  • xs:QName*

    A sequence of QNames, one for each available collection, or an emtpy sequence.

create#1

declare updating function ddl:create(
    $name as xs:QName
) as item()* external

The create function is an updating function which creates the collection with the given expanded QName.

Parameters

  • $name as xs:QName
    The QName of the collection to create.

Errors

  • zerr:ZDDY0002 if a collection with the given expanded QName already exists.

create#2

declare updating function ddl:create(
    $name as xs:QName,
    $content as item()*
) as item()* 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.

Parameters

  • $name as xs:QName
    The QName of the collection to create.
  • $content as item()
    The sequences of items (nodes and/or json items) that should be added to the new collection.

Errors

  • zerr:ZDDY0002 if a collection with the given expanded QName already exists.

See also

ddl:create

ddl:insert-nodes-last

delete#1

declare updating function ddl:delete(
    $coll as xs:QName
) as item()* external

The delete function is an updating function that removes the collection with the given expanded QName.

Parameters

  • $coll as xs:QName

Errors

  • zerr:ZDDY0003 if the collection with the given name does not exist.
  • zerr:ZDDY0015 if any of the in-scope variables references an item that belongs to the collection with QName $name.

is-available-collection#1

declare function ddl:is-available-collection(
    $name as xs:QName
) as xs:boolean external

The function returns true if a collection with the given QName is available.

Parameters

  • $name as xs:QName
    The QName of the collection that is being checked.

Returns

  • xs:boolean

    true if the collection is available and false otherwise.

blog comments powered by Disqus