Replication: XQuery functions

For more details on the functions please consult the wiki.

Register receiver

Programatically register the replication receiver. Recommended to invoke during startup via the XQuery Startup Trigger mechanism. An example can be found here.
(: Register replication receiver :) replication:register($jmsConfiguration as map(*))

Sync resource

Synchronize a document or collection. The function requires a collection.xconf configuration document in /db/system/... for the collection that contains the resource. For a collection only that collection is synchronized, not the resources in the collection.
(: Synchronize resource :) replication:sync($path as xs:string)

Sync metadata of resource

Synchronize the metadata of a document or collection. The function requires a collection.xconf configuration document in /db/system/... for the collection that contains the resource. For a collection only that collection is synchronized, not the metadata of the resources in the collection.
(: Synchronize metadata of resource :) replication:sync-metadata($path as xs:string)

Manage status ReplicationTrigger

With this function the ReplicationTrigger can be (globally) switched on and off. This is usefull in case of restoring a backup or maintenance on the database.
(: Synchronize metadata of resource :) replication:enable-trigger($newState as xs:boolean)

Retrieve status ReplicationTrigger

With this function the status (switched on/off) of the ReplicationTrigger can be retrieved.
(: Get status of replication trigger :) replication:trigger-status()