MarkLogic 9 Product Documentation
temporal functions

The table below lists all the temporal built-in functions (in this namespace: http://marklogic.com/xdmp/temporal).

You can also view these functions broken down by category:

This module contains the functions used to insert, delete and manage temporal documents.

To understand the temporal functions, you need to understand the meaning of the following terms:

The Tiered Storage function module is installed as the following file:

where install_dir is the directory in which MarkLogic Server is installed.

To use the temporal.xqy module in your own XQuery modules, include the following line in your XQuery prolog:

import module namespace temporal="http://marklogic.com/xdmp/temporal" 
          at "/MarkLogic/temporal.xqy";
33 functions
Function name Description
temporal:advance-lsqt This function enables Last Stable Query Time (LSQT) on the named collection and advances the LSQT for the collection to the maximum system start time.
temporal:axes This function returns all the axis names defined in the schema databases.
temporal:axis-create This function constructs an axis definition based on the existing range indexes that can be added to a temporal collection in subsequent API calls.
temporal:axis-get-end This function returns the range index used to define the end of the period by the named axis.
temporal:axis-get-start This function returns the range index used to define the start of the period by the named axis.
temporal:axis-remove This function removes an axis definition from the schema database.
temporal:collection-create This function constructs a named and protected temporal collection in the schema database with the specified system and optional valid axes.
temporal:collection-get-axis This function returns the name of either the system or valid axis in the named temporal collection.
temporal:collection-get-options This function returns the options set on the temporal collection.
temporal:collection-remove This function removes the named temporal collection from the Schemas database.
temporal:collection-set-options This function sets the options on the temporal collection.
temporal:collections This function returns all of the temporal collection names in the schema database.
temporal:document-delete This function deletes the temporal document identified by the given URI.
temporal:document-insert This function inserts a document into the database and stores it as a temporal document.
temporal:document-load This function inserts a document into the database and stores it as a temporal document.
temporal:document-period This function returns the period (as a dateTime pair) for the named axis in the document identified by its root node in the named collection.
temporal:document-protect Protects a temporal document from certain temporal operations, such as update, delete or wipe for a specific period of time.
temporal:document-wipe Deletes all versions of a temporal document.
temporal:get-lsqt This function returns the Last Stable Query Time (LSQT) for the collection at current moment.
temporal:get-lsqt-automation This function returns whether Last Stable Query Time (LSQT) management is automatically managed (true) or not automatically managed (false).
temporal:get-lsqt-automation-lag When the LSQT is advanced automatically, this function returns how far behind (in milliseconds) the Last Stable Query Time (LSQT) is from latest system time.
temporal:get-lsqt-automation-period This function returns how often Last Stable Query Time (LSQT) is automatically advanced, in milliseconds.
temporal:get-use-lsqt This function specifies whether the named temporal collection has LSQT (Last Stable Query Time) enabled (true) or disabled (false).
temporal:node-delete Deletes a node from the database.
temporal:node-insert-after Adds an immediately following sibling to a node in a temporal document.
temporal:node-insert-before Adds an immediately preceding sibling to a node in a temporal document.
temporal:node-insert-child Adds a new last child to a node in a temporal document.
temporal:node-replace Replaces a node in a temporal document.
temporal:set-lsqt-automation This function sets whether Last Stable Query Time (LSQT) management is automatic.
temporal:set-use-lsqt This function enables or disables the use of LSQT (Last Stable Query Time) on the named collection.
temporal:statement-get-system-time This function gets the system start time on temporal documents that are inserted or deleted in the same statement as this function.
temporal:statement-set-document-version-uri This function sets document URI for a temporal document to be used for the new version of temporal document to be generated in the current statement.
temporal:statement-set-system-time This function sets the system start time on temporal documents that are inserted or deleted in the same statement as this function.
Powered by MarkLogic Server | Terms of Use | Privacy Policy