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

Description

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

import module namespace icdml = "http://zorba.io/modules/store/static/integrity-constraints/dml";
This module defines a function to check if an integrity constraint is satisfied. The integrity constraint needs to be declared in the prolog of a module.

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.

Module code

Here is the actual XQuery module code.

See also

Authors

Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis

Version Declaration

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

Namespaces

icdmlhttp://zorba.io/modules/store/static/integrity-constraints/dml
verhttp://zorba.io/options/versioning
zerrhttp://zorba.io/errors

Function Summary

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

Checks if the specified constraints are valid in the database.

Functions

check-integrity-constraint#1

declare function icdml:check-integrity-constraint(
    $name as xs:QName
) as xs:boolean external

Checks if the specified constraints are valid in the database.

Parameters

  • $name

    The name of the integrity constraint to check.

Returns

  • xs:boolean

    true if the constraints are valid; false otherwise.

Errors

  • zerr:ZDDY0031

    if the integrity constraint is not declared.

  • zerr:ZDDY0032

    if the integrity constraint is not available.