コード例 #1
0
ファイル: Builder.php プロジェクト: cosmow/riak
 /**
  * Set the current field to a value.
  *
  * This is only relevant for insert, update, or findAndUpdate queries. For
  * update and findAndUpdate queries, the $atomic parameter will determine
  * whether or not a $set operator is used.
  *
  * @see Expr::set()
  * @see http://docs.mongodb.org/manual/reference/operator/set/
  * @param mixed $value
  * @param boolean $atomic
  * @return self
  */
 public function set($value, $atomic = true)
 {
     $this->expr->set($value, $atomic && $this->query['type'] !== Query::TYPE_INSERT);
     return $this;
 }