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