Loading TOC...

xdmp functions (Update)

The update built-in functions are XQuery functions to perform update-related tasks such as loading documents, inserting nodes into documents, and so on.

37 functions
Function name Description
xdmp:collection-delete Deletes from the database every document in a collection.
xdmp:directory-create Creates a directory.
xdmp:directory-delete Deletes a directory and all of its child and descendant documents and directories from the database.
xdmp:document-add-collections Adds the named document to the given collections.
xdmp:document-add-permissions Adds the given permissions to the given document or directory.
xdmp:document-add-properties Adds a sequence of properties to the properties of a document.
xdmp:document-assign Assign a document URI to a forest index, using the same algorithm as xdmp:document-insert.
xdmp:document-delete Deletes a document from the database.
xdmp:document-insert Inserts a new document into the database if a document with the specified URI does not already exist.
xdmp:document-load Inserts a new document with the specified URI.
xdmp:document-partition-assign Assign a document to a partition number, using the partition queries in the database or in the second argument.
xdmp:document-put-metadata Adds metadata to the document.
xdmp:document-remove-collections Removes the named document from the given collections.
xdmp:document-remove-metadata Removes metadata with certain keys from a document.
xdmp:document-remove-permissions Removes the given permissions from the named document or directory.
xdmp:document-remove-properties Removes a sequence of properties from the properties of a document.
xdmp:document-set-collections Sets the named document to belong to the given collections, replacing any previously set collections on the named document.
xdmp:document-set-metadata Sets metadata to the document.
xdmp:document-set-permissions Sets the permissions on the named document (or directory) to the given permissions, replacing any permissions previously set on the document (or directory).
xdmp:document-set-properties Sets the properties of a document to the given sequence of elements, replacing any properties that already exist on the document.
xdmp:document-set-property Sets a property on a document.
xdmp:document-set-quality Sets the quality of the document with the given URI.
xdmp:load [DEPRECATED: use xdmp:document-load instead] Inserts a new document from the XML file at $path if a document with the specified URI does not already exist.
xdmp:lock-acquire Acquire a lock on a document or directory for an extended amount of time.
xdmp:lock-for-update Acquires an intent exclusive transaction lock on a URI.
xdmp:lock-release Unlock a document or directory.
xdmp:merge Starts merging the forests of the database, subject to specified options.
xdmp:merging Returns the forest IDs of any currently merging database forests.
xdmp:node-delete Deletes a node from the database.
xdmp:node-insert-after Adds an immediately following sibling to a node.
xdmp:node-insert-before Adds an immediately preceding sibling to a node.
xdmp:node-insert-child Adds a new last child to a node.
xdmp:node-replace Replaces a node.
xdmp:partition-forests Returns a sequence of forest IDs with the specified partition number
xdmp:query-partitions This function returns the partition numbers of the partitions that the specified query will be searched on.
xdmp:range-partition-forests Given a value, the function returns a list of forests that have ranges the value falls into.
xdmp:save Serializes a node as text and saves it to a file.