Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
League
Monga
Query
Update
addToSet
League\Monga\Query\Update::addToSet PHP Method
Update Class Documentation
Show file
Open project: php-loep/monga
addToSet()
public
method
Adds the values to the set or upsert when the dataset doesn't contain them already
public
addToSet
(
string
$field
,
mixed
$value
) :
object
$field
string
field name
$value
mixed
value to set/upsert with
return
object
$this
public function addToSet($field, $value) { return $this->update('$addToSet', $field, $value); }
Update
addToSet
atomic
getOptions
getUpdate
increment
multiple
pop
pull
pullAll
push
pushAll
remove
rename
set
single
unshift
update
upsert