Skip to content

Latest commit

 

History

History
84 lines (57 loc) · 1.53 KB

MongoDatabase.md

File metadata and controls

84 lines (57 loc) · 1.53 KB

MongoDatabase

  • class MongoDatabase (mongo\MongoDatabase)
  • source mongo/MongoDatabase.php

Description

Class MongoDatabase


Properties


Methods


Methods

__construct()

__construct(): void

drop()

drop(): void

Drops this database.


collection()

collection(string $name): mongo\MongoCollection

collections()

collections(): mongo\MongoIterable

Finds all the collections in this database.


createCollection()

createCollection(string $name): void

Create a new collection with the given name.


runCommand()

runCommand(array $command): array

Executes the given command in the context of the current database with a read preference of ReadPreference#primary().