Module: CollectionModify

CollectionModify factory.
Mixes In:
Source:

Methods

arrayAppend(field, any) → {module: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
module:CollectionModify

arrayDelete(field) → {module:CollectionModify}

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

arrayInsert(field, any) → {module: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
module:CollectionModify

execute() → {Promise.<module:Result>}

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

getClassName() → {string}

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

patch(properties) → {module:CollectionModify}

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

set(field, any) → {module: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
module:CollectionModify

unset(fields) → {module:CollectionModify}

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