Module: TableUpdate

Factory function that creates an instance of a statement to update records in a table.
Mixes In:
See:

Methods


execute()

Executes the statement in the database that inserts the given records in the database.
Returns:
A Promise that resolves to an object containing the details reported by the server.
Type
Promise.<module:Result>

execute()

Executes the statement in the database that updates all records in the table that match the given criteria.
Returns:
A Promise that resolves to an object containing the details reported by the server.
Type
Promise.<module:Result>

set(tableField, exprOrLiteral)

Registers an update operation that updates a single field of all documents that match the criteria. This method does not cause the statement to be executed but changes the statement boundaries, which means that if it has been prepared before, it needs to be re-prepared.
Parameters:
Name Type Description
tableField TableField The name of the column to update.
exprOrLiteral ExprOrLiteral A new value to assign to the field.
Returns:
The instance of the statement itself following a fluent API convention.
Type
module:TableUpdate