Module: CollectionModify

Methods

arrayAppend(field, any) → {CollectionModify}

Append element to an array field.
Parameters:
Name Type Description
field string document array field
any * value to append
Source:
Returns:
The query instance.
Type
CollectionModify

arrayDelete(field) → {CollectionModify}

Delete element from an array.
Parameters:
Name Type Description
field string document array field
Source:
Returns:
The query instance.
Type
CollectionModify

arrayInsert(field, any) → {CollectionModify}

Insert element into an array field.
Parameters:
Name Type Description
field string document array field
any * value to insert
Source:
Returns:
The query instance.
Type
CollectionModify

execute() → {Promise.<Result>}

Execute modify operation.
Source:
Returns:
Type
Promise.<Result>

getClassName() → {string}

Retrieve the class name (to avoid duck typing).
Source:
Returns:
The "class" name.
Type
string

patch(properties) → {CollectionModify}

Update multiple document properties.
Parameters:
Name Type Description
properties Object properties to update
Source:
Returns:
The query instance.
Type
CollectionModify

set(field, any) → {CollectionModify}

Set the value of a given document field.
Parameters:
Name Type Description
field string document field
any * value to assign
Source:
Returns:
The query instance.
Type
CollectionModify

unset(fields) → {CollectionModify}

Unset the value of document fields.
Parameters:
Name Type Description
fields Array.<String> | String
Source:
Returns:
The query instance.
Type
CollectionModify