MongoDB クラス
導入
このクラスのインスタンスを使用してデータベースとのやりとりを行います。 データベースを取得するには、このようにします。
<?php
$m = new Mongo(); // 接続
$db = $m->selectDB("example");
?>
あまり一般的ではありませんが、 "null"、"[x,y]"、"3"、"\""、"/" などは正しい形式のデータベース名です。
コレクション名とは異なり、データベース名には "$" を含めてもかまいません。
クラス概要
MongoDB
MongoDB
{
/* メソッド */
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
]] )
}目次
- MongoDB::command — データベースコマンドを実行する
- MongoDB::__construct — 新しいデータベースを作成する
- MongoDB::createCollection — コレクションを作成する
- MongoDB::createDBRef — データベース参照を作成する
- MongoDB::drop — このデータベースを削除する
- MongoDB::dropCollection — コレクションを削除する
- MongoDB::execute — JavaScript コードをデータベースサーバ上で実行する
- MongoDB::forceError — Creates a database error
- MongoDB::getDBRef — データベース参照が指すドキュメントを取得する
- MongoDB::getGridFS — このデータベースに格納されているファイルを扱うためのツールキットを取得する
- MongoDB::getProfilingLevel — このデータベースのプロファイリングラベルを取得する
- MongoDB::lastError — Check if there was an error on the most recent db operation performed
- MongoDB::listCollections — このデータベース内のコレクション一覧を取得する
- MongoDB::prevError — Checks for the last error thrown during a database operation
- MongoDB::repair — このデータベースを修復・圧縮する
- MongoDB::resetError — Clears any flagged errors on the database
- MongoDB::selectCollection — コレクションを取得する
- MongoDB::setProfilingLevel — このデータベースのプロファイリングラベルを設定する
- MongoDB::__toString — このデータベースの名前
MongoDB
There are no user contributed notes for this page.
