The MongoDB class
Einführung
Instances of this class are used to interact with a database. To get a database:
<?php
$m = new Mongo(); // connect
$db = $m->selectDB("example");
?>
A few unusual, but valid, database names: "null", "[x,y]", "3", "\"", "/".
Unlike collection names, database names may contain "$".
Klassenbeschreibung
MongoDB
MongoDB
{
/* Methods */
public MongoCollection createCollection
( string $name
[, bool $capped = FALSE
[, int $size = 0
[, int $max = 0
]]] )
public array repair
([ bool $preserve_cloned_files = FALSE
[, bool $backup_original_files = FALSE
]] )
}Inhaltsverzeichnis
- MongoDB::command — Execute a database command
- MongoDB::__construct — Creates a new database
- MongoDB::createCollection — Creates a collection
- MongoDB::createDBRef — Creates a database reference
- MongoDB::drop — Drops this database
- MongoDB::dropCollection — Drops a collection
- MongoDB::execute — Runs JavaScript code on the database server.
- MongoDB::forceError — Creates a database error
- MongoDB::getCursorInfo — Gets information from the database about cursors
- MongoDB::getDBRef — Fetches the document pointed to by a database reference
- MongoDB::getGridFS — Fetches toolkit for dealing with files stored in this database
- MongoDB::getProfilingLevel — Gets this database's profiling level
- MongoDB::lastError — Check if there was an error on the most recent db operation performed
- MongoDB::listCollections — Get a list of collections in this database
- MongoDB::prevError — Checks for the last error thrown during a database operation
- MongoDB::repair — Repairs and compacts this database
- MongoDB::resetError — Clears any flagged errors on the database
- MongoDB::selectCollection — Gets a collection
- MongoDB::setProfilingLevel — Sets this database's profiling level
- MongoDB::__toString — The name of this database
MongoDB
There are no user contributed notes for this page.
