update : 2015.11.03
php.shukuma.com검색:
|
MongoDB::getCollectionInfo(PECL mongo >=1.6.0) MongoDB::getCollectionInfo — Returns information about collections in this database 설명
public array MongoDB::getCollectionInfo
([ array
$options = array()
] )Gets a list of all collections in the database and returns them as an array of documents, which contain their names and options.
인수
반환값This function returns an array where each element is an array describing a collection. Elements will contain a name key denoting the name of the collection, and optionally contain an options key denoting an array of objects used to create the collection. For example, capped collections will include capped and size options. 오류/예외For MongoDB 2.6 and earlier, MongoException will be thrown if a non-string value was specified for the "filter" option's "name" criteria. 예제Example #1 MongoDB::getCollectionInfo() example
<?php 위 예제의 출력 예시: array(2) { [0]=> array(2) { ["name"]=> string(4) "logs" ["options"]=> array(2) { ["capped"]=> bool(true) ["size"]=> int(10240) } } [1]=> array(2) { ["name"]=> string(5) "users" ["options"]=> array(1) { ["flags"]=> int(1) } } } 참고
|