http://zorba.io/modules/store/dynamic/collections/ddl

View as XML or JSON.

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.

Function Summary

available-collections () as xs:QName* external

Gets the QNames of the collections that are available, if any.

create ($name as xs:QName) external

Creates a collection.

create ($name as xs:QName, $content as item()*) external

Creates a collection and adds the given sequence as content to the new collection.

delete ($name as xs:QName) external

Deletes the collection having the given name.

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

Gets whether a collection with the given name is available.

Functions

available-collections#0

declare  function ddl:available-collections() as xs:QName* external
Gets the QNames of the collections that are available, if any.

Parameters

Returns

xs:QName*
A sequence comprising one QName for each available collection or an emtpy sequence if no collections are available.

create#1

declare  function ddl:create($name as xs:QName) external
Creates a collection.

Parameters

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

Returns

An empty XDM instance and a pending update list that, once applied, creates a collection with the given name.

create#2

declare  function ddl:create($name as xs:QName, $content as item()*) external
Creates a collection and adds the given sequence as content to the new collection.

Parameters

name as xs:QName
The name of the collection to create.
content as item()
The sequence of items (nodes or JSON items) to be added to the new collection.

Returns

An empty XDM instance and a pending update list that, once applied, creates a collection with the given name and inserts the given items into it.

delete#1

declare  function ddl:delete($name as xs:QName) external
Deletes the collection having the given name.

Parameters

name as xs:QName
The name of the collection to delete.

Returns

An empty XDM instance and a pending update list that, once applied, deletes the collection with the given name.

is-available-collection#1

declare  function ddl:is-available-collection($name as xs:QName) as xs:boolean external
Gets whether a collection with the given name 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.