Module: CollectionModify

CollectionModify factory.
Mixes In:

Methods


arrayAppend(field, any)

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

arrayDelete(field)

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

arrayInsert(field, any)

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

execute()

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

patch(properties)

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

set(field, any)

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

unset(fields)

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