프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$connection | MongoDB connection. | ||
$name | name of this database. |
메소드 | 설명 | |
---|---|---|
clearCollections ( ) | Clears internal collection lists. | |
createCollection ( string $name, array $options = [] ) : boolean | Creates new collection. | |
createCommand ( array $document = [] ) : |
Creates MongoDB command associated with this database. | |
dropCollection ( string $name ) : boolean | Drops specified collection. | |
getCollection ( string $name, boolean $refresh = false ) : |
Returns the Mongo collection with the given name. | |
getFileCollection ( string $prefix = 'fs', boolean $refresh = false ) : |
Returns Mongo GridFS collection with given prefix. | |
listCollections ( array $condition = [], array $options = [] ) : array | Returns the list of available collections in this database. |
메소드 | 설명 | |
---|---|---|
selectCollection ( string $name ) : |
Selects collection with given name. | |
selectFileCollection ( string $prefix ) : |
Selects GridFS collection with given prefix. |
public clearCollections ( ) |
public createCommand ( array $document = [] ) : |
||
$document | array | command document contents. |
리턴 | command instance. |
public dropCollection ( string $name ) : boolean | ||
$name | string | name of the collection |
리턴 | boolean | whether operation was successful. |
public getCollection ( string $name, boolean $refresh = false ) : |
||
$name | string | collection name |
$refresh | boolean | whether to reload the collection instance even if it is found in the cache. |
리턴 | Mongo collection instance. |
public getFileCollection ( string $prefix = 'fs', boolean $refresh = false ) : |
||
$prefix | string | collection prefix. |
$refresh | boolean | whether to reload the collection instance even if it is found in the cache. |
리턴 | Mongo GridFS collection. |
protected selectCollection ( string $name ) : |
||
$name | string | collection name. |
리턴 | collection instance. |
protected selectFileCollection ( string $prefix ) : |
||
$prefix | string | file collection prefix. |
리턴 | file collection instance. |