MongoCollection クラス
(PECL mongo >=0.9.0)
はじめに
MongoDB のコレクションを表します。
コレクション名は ASCII セット内の任意の文字を使用できます。たとえば ""、"..."、"my collection" そして "*&#@" といった名前をつけることができます。
ユーザー定義のコレクション名には $ 記号を含めることができません。システムコレクションの中には $ を名前に使うものがあります (local.oplog.$main など) が、 これは予約文字です。名前に $ を含むコレクションを作ったり使ったりしようとすると、 MongoDB が assert を出します。
クラス概要
MongoCollection
{
/* 定数 */
/* フィールド */
/* メソッド */
public findAndModify
( array
$query
[, array $update
[, array $fields
[, array $options
]]] ) : array
public findOne
([ array
}$query = array()
[, array $fields = array()
[, array $options = array()
]]] ) : array定義済み定数
MongoCollection::ASCENDING-
1 - ソートやインデックス作成時に使用する「昇順」。
MongoCollection::DESCENDING-
-1 - ソートやインデックス作成時に使用する「降順」。
フィールド
参考
MongoDB コアドキュメントの » コレクション を参照ください。
目次
- MongoCollection::aggregate — aggregation フレームワークを使って集約する
- MongoCollection::aggregateCursor — Execute an aggregation pipeline command and retrieve results through a cursor
- MongoCollection::batchInsert — 複数のドキュメントをコレクションに追加する
- MongoCollection::__construct — 新しいコレクションを作成する
- MongoCollection::count — コレクション内のドキュメント数を数える
- MongoCollection::createDBRef — データベースへの参照を作成する
- MongoCollection::createIndex — Creates an index on the specified field(s) if it does not already exist
- MongoCollection::deleteIndex — コレクションからインデックスを削除する
- MongoCollection::deleteIndexes — コレクションのすべてのインデックスを削除する
- MongoCollection::distinct — Retrieve a list of distinct values for the given key across a collection
- MongoCollection::drop — コレクションを削除する
- MongoCollection::ensureIndex — Creates an index on the specified field(s) if it does not already exist
- MongoCollection::find — コレクションに問い合わせ、結果セットの MongoCursor を返す
- MongoCollection::findAndModify — ドキュメントを更新して返す
- MongoCollection::findOne — コレクションに問い合わせ、単一の要素を返す
- MongoCollection::__get — コレクションを取得する
- MongoCollection::getDBRef — データベース参照が指すドキュメントを取得する
- MongoCollection::getIndexInfo — このコレクションのインデックスについての情報を返す
- MongoCollection::getName — コレクションの名前を返す
- MongoCollection::getReadPreference — このコレクションの優先読み込みを取得する
- MongoCollection::getSlaveOkay — このコレクションの slaveOkay 設定を取得する
- MongoCollection::getWriteConcern — Get the write concern for this collection
- MongoCollection::group — SQL の GROUP BY コマンドと似た処理を行う
- MongoCollection::insert — ドキュメントをコレクションに追加する
- MongoCollection::parallelCollectionScan — Returns an array of cursors to iterator over a full collection in parallel
- MongoCollection::remove — レコードをコレクションから削除する
- MongoCollection::save — ドキュメントをコレクションに保存する
- MongoCollection::setReadPreference — このコレクションの優先読み込みを設定する
- MongoCollection::setSlaveOkay — Change slaveOkay setting for this collection
- MongoCollection::setWriteConcern — Set the write concern for this database
- MongoCollection::toIndexString — インデックスを指定するキーを、インデックスを指す文字列に変換する
- MongoCollection::__toString — このコレクションの文字列表現
- MongoCollection::update — 指定した条件にもとづいてレコードを更新する
- MongoCollection::validate — コレクションを検証する