PHP » GoLang |
login |
register |
about
|
GoLang MongoDB::listCollections
request it (408)
GoLang replacement for PHP's MongoDB::listCollections
[edit | history]
MongoDB::listCollections(PECL mongo >=0.9.0) MongoDB::listCollections — Gets an array of MongoCollection objects for all collections in this database Description
public array MongoDB::listCollections
([ array
$options = array()
] )Gets a list of all collections in the database and returns them as an array of MongoCollection objects.
Parameters
Return ValuesReturns an array of MongoCollection objects. 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. Changelog
ExamplesExample #1 MongoDB::listCollections() example The following example demonstrates running count on each collection in a database.
<?php The above example will output something similar to: ... amount of documents in demo.pubs: 4 amount of documents in demo.elephpants: 3 amount of documents in demo.cities: 22840 ... See Also
|
more
Recently updated
more
Most requested
more
Last requests
|