mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-03 14:52:13 +02:00
57 lines
1.1 KiB
PHP
57 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace MongoDB\Write;
|
|
|
|
class Batch implements \Countable
|
|
{
|
|
|
|
/**
|
|
* Constructs a new CRUD Batch
|
|
*
|
|
* @return Batch
|
|
*/
|
|
function __construct() {
|
|
}
|
|
|
|
/**
|
|
* Adds a new document to be inserted
|
|
*
|
|
* @param array|object $document Operation/document to add to insert
|
|
* @return Batch
|
|
*/
|
|
function insert($document) {
|
|
}
|
|
|
|
/**
|
|
* Add a update operation to batch
|
|
*
|
|
* @param array|object $query Criteria to search for
|
|
* @param array|object $update Updated document
|
|
* @param integer $limit One or all matching $query
|
|
* @param boolean $upsert Insert document if not exist
|
|
* @return Batch
|
|
*/
|
|
function update($query, $update, $limit, $upsert) {
|
|
}
|
|
|
|
/**
|
|
* Add a delete operation to batch
|
|
*
|
|
* @param array|object $query Which docs to delete
|
|
* @param boolean $limit One or all matching $query
|
|
* @return Batch
|
|
*/
|
|
function delete($query, $limit) {
|
|
}
|
|
|
|
/**
|
|
* Counts how many operations are in the patch
|
|
*
|
|
* @return integer
|
|
*/
|
|
function count() {
|
|
}
|
|
|
|
|
|
}
|