Метод |
Описание |
|
__call ( $name, $arguments ) |
|
|
__construct ( Collection $collection, array $options = null ) |
|
|
asArray ( ) |
|
|
asObject ( ) |
|
|
byId ( string | MongoId $id ) : Cursor |
Filter by id |
|
byIdList ( array $idList ) : Cursor |
Filter by list of \MongoId |
|
copyToCollection ( type $targetCollectionName, type $targetDatabaseName = null ) |
Copy selected documents to another collection |
|
count ( ) : integer |
Count documents in result without applying limit and offset |
|
current ( ) |
|
|
explain ( ) |
|
|
expression ( ) : Expression |
Helper to create new expression |
|
field ( string $field ) : Cursor |
Append field to accept list |
|
fields ( array $fields ) : Cursor |
Return only specified fields |
|
filter ( $handler ) |
|
|
findAll ( ) : array |
|
|
findAndRemove ( ) : Document |
Get document instance and remove it from collection |
|
findAndUpdate ( Operator $operator, boolean $upsert = false, boolean $returnUpdated = true ) : null | Document |
Find first document and update it |
|
findOne ( ) : Document | array | null |
Find one document which correspond to expression |
|
findRandom ( ) |
Get random document |
|
getExpression ( ) : Expression |
Get query builder's expression |
|
getHash ( ) |
Used to get hash that uniquely identifies current query |
|
getIdList ( ) : array |
Gte list of \MongoId of current search query |
|
getMongoQuery ( ) : array |
Get MongoDB query array |
|
getOption ( string | integer $name, $default = null ) : mixed |
Get option |
|
getReadPreference ( ) |
|
|
getResultSet ( ) : Sokil\Mongo\ResultSet |
Get result set of documents. |
|
hint ( array | string $specification ) : Cursor |
Specify index to use |
|
isDocumentPoolUsed ( ) |
|
|
isResultAsArray ( ) : boolean |
Check if result returned as array |
|
key ( ) |
|
|
limit ( integer $limit, integer | null $offset = null ) : Cursor |
Limit result set to specified number of elements |
|
limitedCount ( ) : integer |
Count documents in result with applying limit and offset |
|
map ( $handler ) |
|
|
mixedToMongoIdList ( array $list ) : array |
Get list of MongoId objects from array of strings, MongoId's and Document's |
|
moveToCollection ( type $targetCollectionName, type $targetDatabaseName = null ) |
Move selected documents to another collection. |
|
next ( ) |
|
|
paginate ( integer $page, integer $itemsOnPage = 30 ) : Sokil\Mongo\Paginator |
Get paginator |
|
pluck ( string $fieldName ) : array |
Return the values from a single field in the result set of documents |
|
query ( Expression $expression ) : Cursor |
Merge expression |
|
readNearest ( array $tags = null ) |
|
|
readPrimaryOnly ( ) |
|
|
readPrimaryPreferred ( array $tags = null ) |
|
|
readSecondaryOnly ( array $tags = null ) |
|
|
readSecondaryPreferred ( array $tags = null ) |
|
|
rewind ( ) |
|
|
setBatchSize ( integer $size ) : Cursor |
Specifies the number of documents to return in each batch of the response from the MongoDB instance. |
|
setClientTimeout ( type $ms ) : Cursor |
Instructs the driver to stop waiting for a response and throw a
MongoCursorTimeoutException after a set time,
A timeout can be set at any time and will affect subsequent queries on
the cursor, including fetching more results from the database. |
|
setServerTimeout ( type $ms ) : Cursor |
Server-side timeout for a query,
Specifies a cumulative time limit in milliseconds to be allowed
by the server for processing operations on the cursor. |
|
skip ( integer $skip ) : Cursor |
Skip defined number of documents |
|
skipDocumentPool ( ) |
|
|
skipField ( string $field ) : Cursor |
Append field to skip list |
|
skipFields ( array $fields ) : Cursor |
Return all fields except specified |
|
slice ( string $field, integer $limit, integer $skip = null ) : Cursor |
Paginate list of sub-documents |
|
sort ( array $sort ) : Cursor |
Sort result by specified keys and directions |
|
useDocumentPool ( ) |
|
|
valid ( ) |
|
|