Namespace: PatchBuilder

planBuilder. PatchBuilder

PatchBuilder objects have methods.
Since:
  • 3.4.0

Methods


insertAfter(path, node) → {planBuilder.PatchBuilder}

Insert a new node after another node. Provides a client interface to a server function. See op.insertAfter
Parameters:
Name Type Argument Description
path XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
node Item <optional>
The path to insert the node after.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

insertBefore(path, node) → {planBuilder.PatchBuilder}

Insert a new node before another node. Provides a client interface to a server function. See op.insertBefore
Parameters:
Name Type Argument Description
path XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
node Item <optional>
The path to insert the node before.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

insertChild(path, node) → {planBuilder.PatchBuilder}

Insert a node as child. Provides a client interface to a server function. See op.insertChild
Parameters:
Name Type Argument Description
path XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
node Item <optional>
The path to insert the child.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

insertNamedChild(path, key, node) → {planBuilder.PatchBuilder}

This method is specific for JSON and inserts a key/value pair to an object. Provides a client interface to a server function. See op.insertNamedChild
Parameters:
Name Type Argument Description
path XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
key XsString <optional>
The path which returns an JSON Object.
node Item <optional>
The key to insert.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

remove(path) → {planBuilder.PatchBuilder}

This method deletes a document from the database. If the document does not exist, this method does not throw an error. Delete a node. Provides a client interface to a server function. See op.remove
Parameters:
Name Type Argument Description
path XsString <optional>
If this column is not specified then it assumes a column 'uri' is present. This can be a string of the uri column name or an op:col. Use op:view-col or op:schema-col if you need to identify columns in the two views that have the same column name. This can also be a map object specify the uri column name.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

replace(path, node) → {planBuilder.PatchBuilder}

Replace a node with another node. Provides a client interface to a server function. See op.replace
Parameters:
Name Type Argument Description
path XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
node Item <optional>
The path to replace.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

replaceInsertChild(parentPath, pathToReplace, node) → {planBuilder.PatchBuilder}

Replace a child if it exist, or insert if it does not exist. Provides a client interface to a server function. See op.replaceInsertChild
Parameters:
Name Type Argument Description
parentPath XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
pathToReplace XsString <optional>
The parent path to insert/replace.
node Item <optional>
The path to insert/replace which is relative to parent-path.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder

replaceValue(path, value) → {planBuilder.PatchBuilder}

Replace the value of a path with a new value. Provides a client interface to a server function. See op.replaceValue
Parameters:
Name Type Argument Description
path XsString <optional>
The Patch Builder Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
value Item <optional>
The path to replace the value.
Since:
  • 3.4.0
Returns:
Type
planBuilder.PatchBuilder
Copyright (c) 2020 MarkLogic Corporation Documentation generated by JSDoc 4.0.0 on 2024-08-19T23:06:48-07:00 using the DocStrap template.