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

search for in the

MongoMaxKey> <MongoDBRef::isRef
[edit] Last updated: Fri, 25 May 2012

view this page in

MongoMinKey クラス

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

導入

MongoMinKey はデータベースが使う特別な型で、 他のどんな型よりも小さいと評価されます。したがって、 特定のフィールドの昇順でクエリを並べ替えると、値が MongoMinKey であるドキュメントが最初となります。

MongoMinKey にはフィールドやメソッド、定数はありません。 データベースに追加するときに使う、単なる "いちばん小さい" ものです。

クラス概要

MongoMinKey {
}

MongoMinKey の使用例

<?php

$collection
->insert(array("task" => "lunch""do by" => new MongoMinKey));
$collection->insert(array("task" => "staff meeting""do by" => new MongoDate(strtotime("+4 days"))));

$cursor $collection->find()->sort(array("do by" => 1));

?>

このカーソルの中身は、まずlunchドキュメント、次にstaff meetingドキュメントとなります。 lunchドキュメントは、今後コレクションに何が追加されたとしても必ず最初になります ("do by" フィールドが MongoMinKey である別のドキュメントが追加されない限りは)。



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

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