Navigation
Tutorials
Connecting to MongoDB
Creating a Client instance
Connecting to a Standalone server
Connecting to a Replica Set
Connecting with SSL and Authentication
Specifying connection options
Server Selection and Monitoring
Server Selection and Monitoring
Connection String Options
connectTimeoutMS
heartbeatFrequencyMS
serverSelectionTimeoutMS
serverSelectionTryOnce
socketCheckIntervalMS
socketTimeoutMS
CRUD Operations
Insert Documents
Insert One Document
Insert Many Documents
Query Documents
Find One Document
Find Many Documents
Query Projection
Limit, Sort, and Skip Options
Regular Expressions
Complex Queries with Aggregation
Update Documents
Update One Document
Update Many Documents
Replace Documents
Upsert
Delete Documents
Delete One Document
Delete Many Documents
Collation
Overview
Usage
Collation Parameters
Assign a Default Collation to a Collection
Assign a Collation to an Index
Operations that Support Collation
find()
with
sort
findOneAndUpdate()
findOneAndDelete()
deleteMany()
Aggregation
Execute Database Commands
Overview
Commands That Return a Single Result Document
Commands That Yield Multiple Results
Specifying a Custom Read Preference
Custom Data-Types
Decimal128
Overview
Working with Decimal128 Values
Inserting a Decimal128
Mathematical Operations with BCMath
In-Use Encryption
Dependencies
crypt_shared
mongocryptd
Managing Encryption Keys
Creating an Encryption Key
Referencing Encryption Keys by an Alternative Name
Client-Side Field Level Encryption
Automatic Client-Side Field Level Encryption
Server-Side Field Level Encryption Enforcement
Providing Local Automatic Encryption Rules
Explicit Encryption
Explicit Encryption with Automatic Decryption
Queryable Encryption
Automatic Queryable Encryption
Explicit Queryable Encryption
GridFS
Creating a GridFS Bucket
Uploading Files with Writable Streams
Downloading Files with Readable Streams
Selecting Files by Filename and Revision
Deleting Files
Finding File Metadata
Accessing File Metadata for an Existing Stream
Indexes
Create Indexes
List Indexes
Drop Indexes
Tailable Cursor Iteration
Overview
Manually Iterating a Normal Cursor
Iterating a Tailable Cursor
Example Data
Modeling BSON Data
Type Maps
Persistable Classes
Working with Enums
Stable API
Declaring an API Version
Strict API
Fail on Deprecated Commands
Usage with the Command Helper
←
Install the MongoDB PHP Library
Connecting to MongoDB
→