Class: MutateInBuilder

MutateInBuilder

Builder used to create a set of sub-document mutation operations.

<private> new MutateInBuilder()

Since:
  • 2.1.4 (stability: committed)

Methods

addUnique(path, value, createParents)

Adds an array add unique operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
createParents boolean
Since:
  • 2.1.4 (stability: committed)

arrayInsert(path, value)

Adds an array insert operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
Since:
  • 2.1.4 (stability: committed)

counter(path, delta, createParents)

Adds a count operation to this mutation operation set.

Parameters:
Name Type Description
path string
delta number
createParents boolean
Since:
  • 2.1.4 (stability: committed)

execute(callback)

Executes this set of mutation operations on the bucket.

Parameters:
Name Type Description
callback
Since:
  • 2.1.4 (stability: committed)

insert(path, value, createParents)

Adds an insert operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
createParents boolean
Since:
  • 2.1.4 (stability: committed)

pushBack(path, value, createParents)

Adds an array push back operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
createParents boolean
Since:
  • 2.1.4 (stability: committed)

pushFront(path, value, createParents)

Adds an array push front operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
createParents boolean
Since:
  • 2.1.4 (stability: committed)

remove(path)

Adds an remove operation to this mutation operation set.

Parameters:
Name Type Description
path string
Since:
  • 2.1.4 (stability: committed)

replace(path, value)

Adds an replace operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
Since:
  • 2.1.4 (stability: committed)

upsert(path, value, createParents)

Adds an upsert operation to this mutation operation set.

Parameters:
Name Type Description
path string
value Object
createParents boolean
Since:
  • 2.1.4 (stability: committed)