http://zorba.io/modules/store/static/indexes/ddl

View as XML or JSON.

This modules defines a set of functions for managing indexes that are declared in the prolog of a module.

This module is part of Zorba's XQuery Data Definition Facility. All the indexes 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.

Function Summary

available-indexes () as xs:QName* external

Gets the available indexes.

create ($name as xs:QName) external

Creates an index.

declared-indexes () as xs:QName* external

Gets a sequence of QNames representing the indexes that have been declared in the prolog of the static context.

delete ($name as xs:QName) external

Deletes an index.

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

Gets whether an index exists.

is-declared-index ($name as xs:QName) as xs:boolean external

Gets whether an index has been declared in the prolog of the static context.

Functions

available-indexes#0

declare  function iddl:available-indexes() as xs:QName* external
Gets the available indexes.

Parameters

Returns

xs:QName*
A sequence of QNames, one for each available index, or an empty sequence if none are.

create#1

declare  function iddl:create($name as xs:QName) external
Creates an index.

Parameters

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

Returns

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

declared-indexes#0

declare  function iddl:declared-indexes() as xs:QName* external
Gets a sequence of QNames representing the indexes that have been declared in the prolog of the static context.

Parameters

Returns

xs:QName*
A sequence of QNames, one for each created collection, or an emtpy sequence.

delete#1

declare  function iddl:delete($name as xs:QName) external
Deletes an index.

Parameters

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

Returns

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

is-available-index#1

declare  function iddl:is-available-index($name as xs:QName) as xs:boolean external
Gets whether an index exists.

Parameters

name as xs:QName
The name of the index that is being checked.

Returns

xs:boolean
true if the index is available; false otherwise.

is-declared-index#1

declare  function iddl:is-declared-index($name as xs:QName) as xs:boolean external
Gets whether an index has been declared in the prolog of the static context.

Parameters

name as xs:QName
The name of the index that is being checked.

Returns

xs:boolean
true if the index was declared; false otherwise.