Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
ec1ae3ae
Commit
ec1ae3ae
authored
Oct 27, 2016
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revise Collection and Database class intros
parent
6be57505
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
MongoDBCollection.txt
docs/reference/class/MongoDBCollection.txt
+22
-20
MongoDBDatabase.txt
docs/reference/class/MongoDBDatabase.txt
+9
-11
No files found.
docs/reference/class/MongoDBCollection.txt
View file @
ec1ae3ae
...
...
@@ -17,35 +17,37 @@ Definition
Provides methods for common operations on collections and documents,
including CRUD operations and index management.
You can construct collections directly using the PHP extension's
``Manager`` class, select a collection from the |php-library|'s
:phpclass:`MongoDB\\Client` or :phpclass:`MongoDB\\Database`
classes, or create a collection from an existing collection using the
:phpmethod:`withOptions <MongoDB\\Collection::withOptions>` clone method.
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class, select
a collection from the |php-library|'s :phpclass:`MongoDB\\Client` or
:phpclass:`MongoDB\\Database` classes, or create a collection from an
existing collection using the
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions>` clone method.
:phpclass:`MongoDB\\Collection` supports the :php:`readConcern
<mongodb-driver-readconcern>`, :php:`readPreference
<mongodb-driver-readpreference>`, :php:`typeMap
<m
ongodb.persistence.php#mongodb.persistence.typemaps>`, and
:php:`writeConcern <mongodb-driver-writeconcern>` options.
<m
anual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
and
:php:`writeConcern <mongodb-driver-writeconcern>` options.
If you omit an option, the collection inherits the value from the
Manager constructor argument or the Database object used to select
the collection.
Operations within the
``Collection`` class
inherit the
Collection's options.
The :
phpmethod:`MongoDB\\Collection::aggregate` method (when not
using a cursor), :phpmethod:`MongoDB\\Collection::distinct
`, and
Operations within the
:phpclass:`MongoDB\\Collection` class inherit the
Collection's options.
The :
manual:`aggregate </reference/command/aggregate>` (when not using a
cursor), :manual:`distinct </reference/command/distinct>
`, and
:manual:`findAndModify </reference/command/findAndModify>` helpers do not
support a ``typeMap`` option due to a driver limitation.
:phpmethod:`MongoDB\\Collection::aggregate`,
:phpmethod:`MongoDB\\Collection::distinct`,
:phpmethod:`MongoDB\\Collection::findOneAndReplace`,
:phpmethod:`MongoDB\\Collection::findOneAndUpdate`, and
:phpmethod:`MongoDB\\Collection::findOneAndDelete`
return BSON documents as `stdClass` objects and arrays as arrays.
support a ``typeMap`` option due to a driver limitation. The
:phpmethod:`aggregate() <MongoDB\\Collection::aggregate>`,
:phpmethod:`distinct() <MongoDB\\Collection::distinct>`,
:phpmethod:`findOneAndReplace() <MongoDB\\Collection::findOneAndReplace>`,
:phpmethod:`findOneAndUpdate() <MongoDB\\Collection::findOneAndUpdate>`, and
:phpmethod:`findOneAndDelete() <MongoDB\\Collection::findOneAndDelete>`
methods return BSON documents as `stdClass` objects and BSON arrays as
arrays.
Methods
...
...
docs/reference/class/MongoDBDatabase.txt
View file @
ec1ae3ae
...
...
@@ -19,24 +19,22 @@ Definition
Provides methods for common operations on a database,
such as executing database commands and managing collections.
You can construct a database directly using the PHP extension's
``Manager`` class or select a database from the |php-library|'s
:phpclass:`MongoDB\\Client`
class.
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
select a database from the |php-library|'s :phpclass:`MongoDB\\Client` class.
:phpclass:`MongoDB\\Database` supports the :php:`readConcern
<mongodb-driver-readconcern>`, :php:`readPreference
<mongodb-driver-readpreference>`, :php:`typeMap
<m
ongodb.persistence.php#mongodb.persistence.typemaps>`, and
:php:`writeConcern <mongodb-driver-writeconcern>` options.
<m
anual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
and
:php:`writeConcern <mongodb-driver-writeconcern>` options.
If you omit an option, the database inherits the value from the
Manager constructor argument or the Client object used to select
the database.
Operations within the ``Database`` class
:phpmethod:`MongoDB\\Database::command` method
inherit the Database's options.
Operations within the :phpclass:`MongoDB\\Database` class inherit the
Database's options.
.. _database-methods:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment