temporal.collectionCreate( $collection-name as String, $system-axis as String, $valid-axis as String, [$options as String] ) as String
This function constructs a named and protected temporal collection in the schema database with the specified system and valid axes. This function assumes that the system and valid axes already exist. The temporal collection is stored in the Security database.
A TEMPORAL-DUPCOLLECTION exception is thrown if the collection already exists.
For details on how to create a collection, see Create a Temporal Collection in the Temporal Developer's Guide
|$collection-name||The name to be used to identify the temporal collection.|
|$system-axis||The name of the axis to be used by the collection as the system axis.|
|$valid-axis||The name of the axis to be used by the collection as the valid axis.|
Options to control access to the temporal collection:
var temporal = require("/MarkLogic/temporal.xqy"); temporal.collectionCreate("temporalCollection", "system", "valid"); // Creates a temporal collection, named "temporalCollection", with the // "system" and "valid" axes. Use temporal.axisCreate to create the // "system" and "valid" axes. Returns the ID of the temporal collection.