update : 2015.11.03
php.shukuma.com검색:
|
MongoDB::createCollection(PECL mongo >=0.9.0) MongoDB::createCollection — Creates a collection 설명This method is used to create capped collections and other collections requiring special options. It is identical to running:
<?php 인수
반환값Returns a collection object representing the new collection. 예제Example #1 MongoDB::createCollection() capped collection example A capped collection is a special type of collection that has either a fixed or a fixed number of elements. Once the collection is "full," the oldest elements will be removed when new elements are added. Capped collections can be very useful for applications like logging, where you may want to reserve a certain amount of space for logs and not worry about them getting too big. This example creates a very tiny log collection that will keep a maximum of 10 documents.
<?php 위 예제의 출력 예시: sample log message #90 sample log message #91 sample log message #92 sample log message #93 sample log message #94 sample log message #95 sample log message #96 sample log message #97 sample log message #98 sample log message #99 변경점
|