프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$connection | MongoClient | ||
$db | MongoDB\Database | ||
$name | string |
메소드 | 설명 | |
---|---|---|
__construct ( MongoClient $conn, string $name ) | Creates a new database | |
__get ( string $name ) : MongoCollection | Gets a collection | |
__set ( string $name, mixed $value ) | ||
__sleep ( ) : array | ||
__toString ( ) : string | The name of this database | |
authenticate ( string $username, string $password ) : array | Log in to this database | |
command ( array $data, array $options = [], &$hash = null ) : array | Execute a database command | |
createCollection ( string $name, array $options ) : MongoCollection | Creates a collection | |
createDBRef ( string $collection, mixed $document_or_id ) : array | Creates a database reference | |
drop ( ) : array | Drops this database | |
dropCollection ( MongoCollection | string $coll ) : array | Drops a collection | |
execute ( MongoCode | string $code, array $args = [] ) : array | Runs JavaScript code on the database server. | |
forceError ( ) : boolean | Creates a database error | |
getCollectionInfo ( array $options = [] ) : array | Returns information about collections in this database | |
getCollectionNames ( array $options = [] ) : array | Get all collections from this database | |
getConnection ( ) : MongoClient | ||
getDBRef ( array $ref ) : array | Fetches the document pointed to by a database reference | |
getDb ( ) : MongoDB\Database | ||
getGridFS ( string $prefix = "fs" ) : MongoGridFS | Fetches toolkit for dealing with files stored in this database | |
getProfilingLevel ( ) : integer | Gets this database's profiling level | |
lastError ( ) : array | Check if there was an error on the most recent db operation performed | |
listCollections ( array $options = [] ) : MongoCollection[] | Get a list of collections in this database | |
prevError ( ) : array | Checks for the last error thrown during a database operation | |
repair ( boolean $preserve_cloned_files = FALSE, boolean $backup_original_files = FALSE ) : array | Repairs and compacts this database | |
resetError ( ) : array | Clears any flagged errors on the database | |
selectCollection ( string $name ) : MongoCollection | Gets a collection | |
setProfilingLevel ( integer $level ) : integer | Sets this database's profiling level | |
setReadPreference ( $readPreference, $tags = null ) | ||
setWriteConcern ( $wstring, $wtimeout ) |
메소드 | 설명 | |
---|---|---|
notImplemented ( ) |
메소드 | 설명 | |
---|---|---|
checkDatabaseName ( $name ) | ||
createDatabaseObject ( ) : MongoDB\Database | ||
getSystemCollectionFilterClosure ( boolean $includeSystemCollections = false ) : Closure |
public __construct ( MongoClient $conn, string $name ) | ||
$conn | MongoClient | Database connection. |
$name | string | Database name. |
public __toString ( ) : string | ||
리턴 | string | Returns this database's name. |
public createCollection ( string $name, array $options ) : MongoCollection | ||
$name | string | The name of the collection. |
$options | array | |
리턴 | MongoCollection | Returns a collection object representing the new collection. |
public dropCollection ( MongoCollection | string $coll ) : array | ||
$coll | MongoCollection | string | MongoCollection or name of collection to drop. |
리턴 | array | Returns the database response. |
public forceError ( ) : boolean | ||
리턴 | boolean | Returns the database response. |
public getCollectionInfo ( array $options = [] ) : array | ||
$options | array | An array of options for listing the collections. |
리턴 | array |
public getCollectionNames ( array $options = [] ) : array | ||
$options | array | An array of options for listing the collections. |
리턴 | array | Returns the names of the all the collections in the database as an array |
public getProfilingLevel ( ) : integer | ||
리턴 | integer | Returns the profiling level. |
public listCollections ( array $options = [] ) : MongoCollection[] | ||
$options | array | |
리턴 | MongoCollection[] | Returns a list of MongoCollections. |
public repair ( boolean $preserve_cloned_files = FALSE, boolean $backup_original_files = FALSE ) : array | ||
$preserve_cloned_files | boolean | [optional] If cloned files should be kept if the repair fails. |
$backup_original_files | boolean | [optional] If original files should be backed up. |
리턴 | array | Returns db response. |
public resetError ( ) : array | ||
리턴 | array | Returns the database response. |
public selectCollection ( string $name ) : MongoCollection | ||
$name | string | The collection name. |
리턴 | MongoCollection | Returns a new collection object. |
public setProfilingLevel ( integer $level ) : integer | ||
$level | integer | Profiling level. |
리턴 | integer | Returns the previous profiling level. |