@@ 1089-1091 (lines=3) @@ | ||
1086 | * @return void |
|
1087 | */ |
|
1088 | public function update($col, $cond, $data, $flags = 0, $cb = NULL, $params = []) { |
|
1089 | if (strpos($col, '.') === false) { |
|
1090 | $col = $this->dbname . '.' . $col; |
|
1091 | } |
|
1092 | ||
1093 | if (is_string($cond)) { |
|
1094 | $cond = new \MongoCode($cond); |
|
@@ 1202-1204 (lines=3) @@ | ||
1199 | * @return MongoId |
|
1200 | */ |
|
1201 | public function insert($col, $doc = [], $cb = NULL, $params = []) { |
|
1202 | if (strpos($col, '.') === false) { |
|
1203 | $col = $this->dbname . '.' . $col; |
|
1204 | } |
|
1205 | ||
1206 | if (!isset($doc['_id'])) { |
|
1207 | $doc['_id'] = new \MongoId; |
|
@@ 1258-1260 (lines=3) @@ | ||
1255 | * @return array IDs |
|
1256 | */ |
|
1257 | public function insertMulti($col, $docs = [], $cb = NULL, $params = []) { |
|
1258 | if (strpos($col, '.') === false) { |
|
1259 | $col = $this->dbname . '.' . $col; |
|
1260 | } |
|
1261 | ||
1262 | $ids = []; |
|
1263 | $bson = ''; |
|
@@ 1303-1305 (lines=3) @@ | ||
1300 | * @return void |
|
1301 | */ |
|
1302 | public function remove($col, $cond = [], $cb = NULL, $params = []) { |
|
1303 | if (strpos($col, '.') === false) { |
|
1304 | $col = $this->dbname . '.' . $col; |
|
1305 | } |
|
1306 | ||
1307 | if (is_string($cond)) { |
|
1308 | $cond = new \MongoCode($cond); |
|
@@ 1346-1348 (lines=3) @@ | ||
1343 | * @return void |
|
1344 | */ |
|
1345 | public function getMore($col, $id, $number, $conn) { |
|
1346 | if (strpos($col, '.') === false) { |
|
1347 | $col = $this->dbname . '.' . $col; |
|
1348 | } |
|
1349 | ||
1350 | $this->request(self::OP_GETMORE, |
|
1351 | "\x00\x00\x00\x00" |