Свойство | Тип | Описание | |
---|---|---|---|
$batchSize | integer | ||
$collection | MongoDB\Collection | ||
$connection | MongoClient | ||
$cursor | MongoDB\Driver\Cursor | ||
$cursorNeedsAdvancing | boolean | ||
$db | MongoDB\Database | ||
$iterator | Iterator | ||
$ns | string | ||
$optionNames | array | ||
$position | integer | ||
$startedIterating | boolean |
Метод | Описание | |
---|---|---|
__construct ( MongoClient $connection, string $ns ) | Create a new cursor | |
__sleep ( ) : array | ||
batchSize ( integer $batchSize ) | Limits the number of elements returned in one batch. | |
current ( ) : array | Returns the current element | |
dead ( ) : boolean | Checks if there are documents that have not been sent yet from the database for this cursor | |
info ( ) : array | ||
key ( ) : string | Returns the current result's _id | |
next ( ) : array | Advances the cursor to the next result, and returns that result | |
rewind ( ) : void | Returns the cursor to the beginning of the result set | |
setReadPreference ( string $readPreference, array $tags = null ) | ||
timeout ( integer $ms ) | Sets a client-side timeout for this query | |
valid ( ) : boolean | Checks if the cursor is reading a valid result. |
Метод | Описание | |
---|---|---|
ensureCursor ( ) : MongoDB\Driver\Cursor | ||
ensureIterator ( ) : Iterator | ||
errorIfOpened ( ) | ||
getCursorInfo ( ) : array | ||
getIterationInfo ( ) : array | ||
getOptions ( array $optionNames = null ) : array | Applies all options set on the cursor, overwriting any options that have already been set | |
notImplemented ( ) | ||
reset ( ) | Clears the cursor | |
storeIteratorState ( ) | Stores the current cursor element. | |
wrapTraversable ( Traversable $traversable ) : Generator |
public __construct ( MongoClient $connection, string $ns ) | ||
$connection | MongoClient | Database connection. |
$ns | string | Full name of database and collection. |
abstract protected ensureCursor ( ) : MongoDB\Driver\Cursor | ||
Результат | MongoDB\Driver\Cursor |
abstract protected getCursorInfo ( ) : array | ||
Результат | array |
protected getOptions ( array $optionNames = null ) : array | ||
$optionNames | array | Array of option names to be applied (will be read from properties) |
Результат | array |
protected reset ( ) |
public setReadPreference ( string $readPreference, array $tags = null ) | ||
$readPreference | string | |
$tags | array |
protected storeIteratorState ( ) |
protected wrapTraversable ( Traversable $traversable ) : Generator | ||
$traversable | Traversable | |
Результат | Generator |
protected Collection,MongoDB $collection | ||
Результат | MongoDB\Collection |