The MongoDB class
소개
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 "$".
클래스 개요
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
]] )
}Table of Contents
- 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::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::listCollections — Get a list of collections in this database
- MongoDB::repair — Repairs and compacts this 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.
