MongoDB数据库类
定义
MongoDB\Database
提供对数据库的常见操作方法,例如执行数据库命令和管理集合。
您可以直接使用扩展的MongoDB\Driver\Manager类或从库中选择一个数据库。
MongoDB\Client
类。也可以通过withOptions()
方法从现有的MongoDB\Database
对象克隆数据库。MongoDB\Database
supports the readConcern, readPreference, typeMap, and writeConcern options. If you omit an option, the database inherits the value from the Manager constructor argument or theClient
object used to select the database.MongoDB\Database
类中的操作继承数据库的选项。