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
ccff7815
Commit
ccff7815
authored
Jan 25, 2017
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v1.1'
parents
cd894961
a5aa67ac
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
95 additions
and
1 deletion
+95
-1
apiargs-MongoDBCollection-common-option.yaml
docs/includes/apiargs-MongoDBCollection-common-option.yaml
+1
-1
extracts-note.yaml
docs/includes/extracts-note.yaml
+12
-0
MongoDBCollection-count.txt
docs/reference/method/MongoDBCollection-count.txt
+5
-0
MongoDBCollection-deleteMany.txt
docs/reference/method/MongoDBCollection-deleteMany.txt
+5
-0
MongoDBCollection-deleteOne.txt
docs/reference/method/MongoDBCollection-deleteOne.txt
+5
-0
MongoDBCollection-distinct.txt
docs/reference/method/MongoDBCollection-distinct.txt
+5
-0
MongoDBCollection-find.txt
docs/reference/method/MongoDBCollection-find.txt
+5
-0
MongoDBCollection-findOne.txt
docs/reference/method/MongoDBCollection-findOne.txt
+5
-0
MongoDBCollection-findOneAndDelete.txt
docs/reference/method/MongoDBCollection-findOneAndDelete.txt
+5
-0
MongoDBCollection-findOneAndReplace.txt
.../reference/method/MongoDBCollection-findOneAndReplace.txt
+5
-0
MongoDBCollection-findOneAndUpdate.txt
docs/reference/method/MongoDBCollection-findOneAndUpdate.txt
+5
-0
MongoDBCollection-replaceOne.txt
docs/reference/method/MongoDBCollection-replaceOne.txt
+5
-0
MongoDBCollection-updateMany.txt
docs/reference/method/MongoDBCollection-updateMany.txt
+5
-0
MongoDBCollection-updateOne.txt
docs/reference/method/MongoDBCollection-updateOne.txt
+5
-0
MongoDBGridFSBucket-find.txt
docs/reference/method/MongoDBGridFSBucket-find.txt
+5
-0
MongoDBGridFSBucket-findOne.txt
docs/reference/method/MongoDBGridFSBucket-findOne.txt
+5
-0
crud.txt
docs/tutorial/crud.txt
+12
-0
No files found.
docs/includes/apiargs-MongoDBCollection-common-option.yaml
View file @
ccff7815
...
@@ -17,7 +17,7 @@ description: |
...
@@ -17,7 +17,7 @@ description: |
and accent marks. When specifying collation, the ``locale`` field is
and accent marks. When specifying collation, the ``locale`` field is
mandatory; all other collation fields are optional. For descriptions of the
mandatory; all other collation fields are optional. For descriptions of the
fields, see :manual:`Collation Document
fields, see :manual:`Collation Document
<reference/collation/#collation-document>`.
<
/
reference/collation/#collation-document>`.
If the collation is unspecified but the collection has a default collation,
If the collation is unspecified but the collection has a default collation,
the operation uses the collation specified for the collection. If no
the operation uses the collation specified for the collection. If no
...
...
docs/includes/extracts-note.yaml
0 → 100644
View file @
ccff7815
ref
:
note-bson-comparison
content
:
|
When evaluating query criteria, MongoDB compares types and values according to
its own :manual:`comparison rules for BSON types
</reference/bson-type-comparison-order>`, which differs from PHP's
:php:`comparison <manual/en/types.comparisons.php>` and :php:`type juggling
<manual/en/language.types.type-juggling.php>` rules. When matching a special
BSON type the query criteria should use the respective :php:`BSON class
<manual/en/book.bson.php>` in the driver (e.g. use
:php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` to match an
:manual:`ObjectId </reference/object-id/>`).
...
docs/reference/method/MongoDBCollection-count.txt
View file @
ccff7815
...
@@ -42,6 +42,11 @@ Errors/Exceptions
...
@@ -42,6 +42,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
.. todo: add output and examples
.. todo: add output and examples
See Also
See Also
...
...
docs/reference/method/MongoDBCollection-deleteMany.txt
View file @
ccff7815
...
@@ -42,6 +42,11 @@ Errors/Exceptions
...
@@ -42,6 +42,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Example
Example
-------
-------
...
...
docs/reference/method/MongoDBCollection-deleteOne.txt
View file @
ccff7815
...
@@ -44,6 +44,11 @@ Errors/Exceptions
...
@@ -44,6 +44,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Example
Example
-------
-------
...
...
docs/reference/method/MongoDBCollection-distinct.txt
View file @
ccff7815
...
@@ -42,6 +42,11 @@ Errors/Exceptions
...
@@ -42,6 +42,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-find.txt
View file @
ccff7815
...
@@ -41,6 +41,11 @@ Errors/Exceptions
...
@@ -41,6 +41,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-findOne.txt
View file @
ccff7815
...
@@ -43,6 +43,11 @@ Errors/Exceptions
...
@@ -43,6 +43,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-findOneAndDelete.txt
View file @
ccff7815
...
@@ -43,6 +43,11 @@ Errors/Exceptions
...
@@ -43,6 +43,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-findOneAndReplace.txt
View file @
ccff7815
...
@@ -45,6 +45,11 @@ Errors/Exceptions
...
@@ -45,6 +45,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-findOneAndUpdate.txt
View file @
ccff7815
...
@@ -45,6 +45,11 @@ Errors/Exceptions
...
@@ -45,6 +45,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-replaceOne.txt
View file @
ccff7815
...
@@ -44,6 +44,11 @@ Errors/Exceptions
...
@@ -44,6 +44,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Example
Example
-------
-------
...
...
docs/reference/method/MongoDBCollection-updateMany.txt
View file @
ccff7815
...
@@ -42,6 +42,11 @@ Errors/Exceptions
...
@@ -42,6 +42,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBCollection-updateOne.txt
View file @
ccff7815
...
@@ -44,6 +44,11 @@ Errors/Exceptions
...
@@ -44,6 +44,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
Examples
Examples
--------
--------
...
...
docs/reference/method/MongoDBGridFSBucket-find.txt
View file @
ccff7815
...
@@ -41,6 +41,11 @@ Errors/Exceptions
...
@@ -41,6 +41,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
.. todo: add examples
.. todo: add examples
See Also
See Also
...
...
docs/reference/method/MongoDBGridFSBucket-findOne.txt
View file @
ccff7815
...
@@ -44,6 +44,11 @@ Errors/Exceptions
...
@@ -44,6 +44,11 @@ Errors/Exceptions
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst
Behavior
--------
.. include:: /includes/extracts/note-bson-comparison.rst
.. todo: add examples
.. todo: add examples
See Also
See Also
...
...
docs/tutorial/crud.txt
View file @
ccff7815
...
@@ -92,6 +92,8 @@ The |php-library| provides the :phpmethod:`MongoDB\\Collection::findOne()` and
...
@@ -92,6 +92,8 @@ The |php-library| provides the :phpmethod:`MongoDB\\Collection::findOne()` and
:phpmethod:`MongoDB\\Collection::aggregate()` method for performing
:phpmethod:`MongoDB\\Collection::aggregate()` method for performing
:manual:`aggregation operations </core/aggregation-pipeline>`.
:manual:`aggregation operations </core/aggregation-pipeline>`.
.. include:: /includes/extracts/note-bson-comparison.rst
Find One Document
Find One Document
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
...
@@ -137,6 +139,16 @@ The output would then resemble::
...
@@ -137,6 +139,16 @@ The output would then resemble::
}
}
}
}
.. note::
The criteria in this example matched an ``_id`` with a string value of
``"94301"``. The same criteria would not have matched a document with an
integer value of ``94301`` due to MongoDB's :manual:`comparison rules for
BSON types </reference/bson-type-comparison-order>`. Similarly, users should
use a :php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` object
when matching an ``_id`` with an :manual:`ObjectId </reference/object-id/>`
value, as strings and ObjectIds are not directly comparable.
.. seealso:: :phpmethod:`MongoDB\\Collection::findOne()`
.. seealso:: :phpmethod:`MongoDB\\Collection::findOne()`
Find Many Documents
Find Many Documents
...
...
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