http://zorba.io/modules/store/static/integrity-constraints/ddl

View as XML or JSON.

This module defines a set of functions to manage integrity constraints that are declared in the prolog of a module. For example, it provides functions to activate or deactivate integrity constraints.

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

activate ($name as xs:QName) external

Activates an integrity constraint in the dynamic context.

activated-integrity-constraints () as xs:QName* external

Gets the integrity constraints that are activated, if any.

deactivate ($name as xs:QName) external

Deactivates the integrity constraint.

declared-integrity-constraints () as xs:QName* external

Gets the sequence of QNames representing the integrity constraints that have been declared in the prolog of the static context.

is-activated-integrity-constraint ($name as xs:QName) as xs:boolean external

Gets whether an integrity constraints is activated.

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

Gets whether an integrity constraint is declared in the prolog of the static context.

Functions

activate#1

declare  function icddl:activate($name as xs:QName) external
Activates an integrity constraint in the dynamic context.

Parameters

name as xs:QName
The name of the integrity constraint to activate.

Returns

An empty XDM instance and a pending update list that consists of a upd:activateIntegrityConstraint($name) update primitive.

activated-integrity-constraints#0

declare  function icddl:activated-integrity-constraints() as xs:QName* external
Gets the integrity constraints that are activated, if any.

Parameters

Returns

xs:QName*
A sequence of QNames, one for each activated integrity constraint, or an empty sequence if none.

deactivate#1

declare  function icddl:deactivate($name as xs:QName) external
Deactivates the integrity constraint.

Parameters

name as xs:QName
The name of the integrity constraint to deactivate.

Returns

An empty XDM instance and a pending update list that, once applied, deactivates the integrity constraint.

declared-integrity-constraints#0

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

Parameters

Returns

xs:QName*
A sequence of QNames, one for each created integrity constraints, or an emtpy sequence if none.

is-activated-integrity-constraint#1

declare  function icddl:is-activated-integrity-constraint($name as xs:QName) as xs:boolean external
Gets whether an integrity constraints is activated.

Parameters

name as xs:QName
The name of the constraint to check.

Returns

xs:boolean
true if the integrity constraint is activated; false otherwise.

is-declared-integrity-constraint#1

declare  function icddl:is-declared-integrity-constraint($name as xs:QName) as xs:boolean external
Gets whether an integrity constraint is declared in the prolog of the static context.

Parameters

name as xs:QName
The name of the constraint to check.

Returns

xs:boolean
true if the constraint is declared; false otherwise.