Loading TOC...

temporal.setUseLsqt

temporal.setUseLsqt(
   $temporal-collection as String,
   $on as Boolean
) as null

Summary

This function enables or disables the use of LSQT (Last Stable Query Time) on the named collection. When enabled (true), a document is created in the database to hold the LSQT. This document is identified by the collection name with an .lsqt suffix.

You must have LSQT enabled on the temporal collection in order to use the temporal:statement-set-system-time function to manually set the system start time when inserting a document into that collection.

For details on how to use LSQT, see Last Stable Query Time (LSQT) and Application-controlled System Time in the Temporal Developer's Guide

Parameters
$temporal-collection The name of the temporal collection.
$on Set to fn:true() to enable LSQT on the collection or fn:false() (the default) to disable LSQT.

Example

declareUpdate();
var temporal = require("/MarkLogic/temporal.xqy");
temporal.setUseLsqt("kool", true);

//  Set the temporal collection, "kool", to use LSQT. A document, named
//  "kool.lsqt", that contains the latest LSQT is created in the database.
//  Requires the specified temporal collection to exist. Use 
//  temporal.collectionCreate to create the temporal collection. 

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy