Метод |
Описание |
|
all ( array $query = [], array $fields = [] ) : Shanty_Mongo_Iterator_Cursor |
Find many documents |
|
create ( array $data = [], boolean $new = true ) |
Create a new document belonging to this collection |
|
deleteIndex ( string | array $keys ) |
Delete an index |
|
deleteIndexes ( ) |
Remove all indexes from this collection |
|
distinct ( String $property, $query = [] ) : array |
Select distinct values for a property |
|
drop ( ) |
Drop this collection |
|
ensureIndex ( array $keys, array $options = [] ) |
Ensure an index |
|
fetchAll ( array $query = [], array $fields = [] ) : Shanty_Mongo_Iterator_Cursor |
Alias for all |
|
fetchOne ( array $query = [], array $fields = [] ) : Shanty_Mongo_Document |
Alias for one |
|
find ( MongoId | String $id, array $fields = [] ) : Shanty_Mongo_Document |
Find a document by id |
|
getCollectionInheritance ( ) |
Get the inheritance of this collection |
|
getCollectionName ( ) : string |
Get the name of the mongo collection |
|
getCollectionRequirements ( bolean $inherited = true ) : array |
Get requirements |
|
getConnection ( $writable = true ) |
*
Get a connection |
|
getConnectionGroupName ( ) : string |
Get the name of the connection group |
|
getDbName ( ) : string |
Get the name of the mongo db |
|
getDocumentClass ( ) : string |
Get the name of the document class |
|
getDocumentSetClass ( ) : string |
Get the name of the document set class |
|
getIndexInfo ( ) : array |
Get index information for this collection |
|
getMongoCollection ( $writable = true ) : MongoCollection |
Get an instance of MongoCollection |
|
getMongoDb ( $writable = true ) : MongoDb |
Get an instance of MongoDb |
|
hasCollectionName ( ) : boolean |
Determine if this collection has a collection name set |
|
hasDbName ( ) : boolean |
Determine if this collection has a database name set |
|
insert ( array $document, array $options = [] ) |
Insert a document |
|
insertBatch ( array $documents, array $options = [] ) |
Insert a batch of documents |
|
isDocumentClass ( ) : boolean |
Is this class a document class |
|
makeRequirementsTidy ( array $requirements ) : array |
Process requirements to make sure they are in the correct format |
|
mergeRequirements ( $requirements1, $requirements2 ) : array |
Merge a two sets of requirements together |
|
one ( array $query = [], array $fields = [] ) : Shanty_Mongo_Document |
Find one document |
|
remove ( array $criteria, array $options = [] ) |
Remove documents from this collection |
|
update ( array $criteria, array $object, array $options = [] ) |
Update documents from this collection |
|