downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoCollection::batchInsert> <MongoDB::__toString
[edit] Last updated: Fri, 10 Feb 2012

view this page in

MongoCollection クラス

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)

導入

データベース接続を表します。

コレクション名は ASCII セット内の任意の文字を使用できます。たとえば ""、"..."、"my collection" そして "*&#@" といった名前をつけることができます。

ユーザ定義のコレクション名には $ 記号を含めることができません。システムコレクションの中には $ を名前に使うものがあります (local.oplog.$main など) が、 これは予約文字です。名前に $ を含むコレクションを作ったり使ったりしようとすると、 MongoDB が assert を出します。

クラス概要

MongoCollection {
/* 定数 */
const int ASCENDING = 1 ;
const int DESCENDING = -1 ;
/* フィールド */
public MongoDB $MongoCollection->db = NULL ;
public integer $w ;
public integer $wtimeout ;
/* メソッド */
public mixed MongoCollection::batchInsert ( array $a [, array $options = array() ] )
public MongoCollection::__construct ( MongoDB $db , string $name )
public int MongoCollection::count ([ array $query = array() [, int $limit = 0 [, int $skip = 0 ]]] )
public array MongoCollection::createDBRef ( array $a )
public array MongoCollection::deleteIndex ( string|array $keys )
public array MongoCollection::deleteIndexes ( void )
public array MongoCollection::drop ( void )
public bool MongoCollection::ensureIndex ( string|array $key|keys [, array $options = array() ] )
public MongoCursor MongoCollection::find ([ array $query = array() [, array $fields = array() ]] )
public array MongoCollection::findOne ([ array $query = array() [, array $fields = array() ]] )
public MongoCollection MongoCollection::__get ( string $name )
public array MongoCollection::getDBRef ( array $ref )
public array MongoCollection::getIndexInfo ( void )
public string MongoCollection::getName ( void )
public bool MongoCollection::getSlaveOkay ( void )
public array MongoCollection::group ( mixed $keys , array $initial , MongoCode $reduce [, array $options = array() ] )
public bool|array MongoCollection::insert ( array $a [, array $options = array() ] )
public bool|array MongoCollection::remove ([ array $criteria = array() [, array $options = array() ]] )
public mixed MongoCollection::save ( array $a [, array $options = array() ] )
public bool MongoCollection::setSlaveOkay ([ bool $ok = true ] )
static protected string MongoCollection::toIndexString ( mixed $keys )
public string MongoCollection::__toString ( void )
public bool|array MongoCollection::update ( array $criteria , array $new_object [, array $options = array() ] )
public array MongoCollection::validate ([ bool $scan_data = FALSE ] )
}

定義済み定数

MongoCollection::ASCENDING
1
ソートやインデックス作成時に使用する「昇順」。
MongoCollection::DESCENDING
-1
ソートやインデックス作成時に使用する「降順」。

フィールド

db

このコレクションの "親" データベース。

w

成功を返す前に変更をレプリケートするサーバの数。 この値は親データベースから引き継ぎます。 MongoDB クラスのマニュアルに、 w の挙動についてのより詳細な説明があります。

wtimeout

$this->w のレプリケーションが完了するまでに待つミリ秒数。 この値は親データベースから引き継ぎます。 MongoDB クラスのマニュアルに、 wtimeout の挙動についてのより詳細な説明があります。

参考

MongoDB コアドキュメントの » コレクション を参照ください。

目次



add a note add a note User Contributed Notes MongoCollection
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites