PHP » GoLang |
login |
register |
about
|
GoLang MongoDB::getCollectionInfo
request it (393)
GoLang replacement for PHP's MongoDB::getCollectionInfo
[edit | history]
PHP MongoDB::getCollectionInfoPHP original manual for MongoDB::getCollectionInfo [ show | php.net ]MongoDB::getCollectionInfo(PECL mongo >=1.6.0) MongoDB::getCollectionInfo — Returns information about collections in this database Description
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.
Parameters
Return ValuesThis 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. Errors/ExceptionsFor MongoDB 2.6 and earlier, MongoException will be thrown if a non-string value was specified for the "filter" option's "name" criteria. ExamplesExample #1 MongoDB::getCollectionInfo() example
<?php The above example will output something similar to: 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) } } } See Also
|
more
Recently updated
more
Most requested
more
Last requests
|