This index documents the current stable MongoDB adapter APIs and shared runtime capabilities. MySQL and PostgreSQL adapter APIs will receive separate entries after runtime support, public types, examples, and verification coverage are available.
| Document | Description |
|---|---|
| Native API comparison | MongoDB native APIs vs monSQLize extensions |
| Basic usage | Common CRUD, pagination, read cache, and Model entry-point examples |
| Configuration reference | Complete new MonSQLize(options) constructor options |
| Connection management | Connection lifecycle and accessors |
| Pool configuration | Multi-pool configuration and runtime routing: declare pools: PoolConfig[] in the constructor and access pools through pool() / use() |
| Chain pool/database access | Chain pool/database access API: pool() / use() / scopedCollection() / scopedModel() |
| ObjectId auto conversion | ObjectId auto conversion for MongoDB query and write paths |
| Model layer | Model schema validation, methods, hooks, relations, and runtime binding |
| Populate API | Load related documents declared by Model relations |
| Relations API | Define hasOne / hasMany / belongsTo-style relationships, array keys, and default selection |
| Hooks API | Standard Model lifecycle hooks for create, update, delete, and find flows |
| Relations and Populate | Model relationship definitions and related-data population |
| Nested Populate | Multi-level relation population |
| SSH tunnel | SSH tunnel: securely connect to private-network databases |
| Error code reference | Error code reference: complete error-code definitions and handling guide |
| Cache system | Cache system (LRU + TTL) |
| Transaction management | Transaction management (automatic retry, cache locks) |
| Write path policy | Optional runtime policy for Model-only write namespaces |
| Change Stream sync | Change Stream data sync: real-time backup to multiple databases |
| Transaction optimizations | Transaction optimization strategies |
| Distributed deployment | Distributed deployment guide for multi-instance cache consistency |
| Production rollout | Production data task rollout, CDC sync, index preflight, and traffic-switch checks |
| Production data migration | Scenario guide for data, indexes, and field edits from development or staging to production |
| Data tasks API | One DataTaskJob, four methods, parameters, backup, and restore contracts |
| Event system | Event system |
| Document | Method | Description |
|---|---|---|
| Find documents | find() |
Query multiple documents |
| Find one document | findOne() |
Query one document |
| Paginated find | findPage() |
Cursor pagination query |
| Count documents | count() |
Count documents |
| Distinct values | distinct() |
Distinct query |
| Watch changes | watch() |
Watch real-time data changes with Change Streams |
| Document | Method | Description |
|---|---|---|
| Insert one document | insertOne() |
Insert one document |
| Insert many documents | insertMany() |
Insert many documents |
| Batch insert | insertBatch() |
Large batch insert with batching and retry |
| Write operations guide | All insert methods | Complete write operations guide |
| Document | Method | Description |
|---|---|---|
| Update methods overview | All update methods | Method choice, traditional operators, and pipeline handoff |
| Upsert guide | Upsert guide | Insert when missing, update when present |
| Update one document | updateOne() |
Update one document |
| Update many documents | updateMany() |
Update many documents |
| Aggregation pipeline update guide | Aggregation pipeline update | Field-to-field calculation, conditional assignment, and pipeline details |
| Batch update | updateBatch() |
Large batch update with batching and retry |
| Replace one document | replaceOne() |
Replace a whole document |
| Find one and update | findOneAndUpdate() |
Atomically update and return |
| Find one and replace | findOneAndReplace() |
Atomically replace and return |
| Document | Method | Description |
|---|---|---|
| Upsert one document | upsertOne() |
Update if present, insert if missing |
| Increment one document | incrementOne() |
Atomically increment or decrement field values |
| Document | Method | Description |
|---|---|---|
| Delete one document | deleteOne() / Model protected delete |
Delete one document or restrict deletion using declared relations |
| Delete many documents | deleteMany() |
Delete many documents |
| Batch delete | deleteBatch() |
Large batch delete with batching and retry |
| Find one and delete | findOneAndDelete() |
Atomically delete and return |
| Document | Method | Description |
|---|---|---|
| Aggregation pipeline | aggregate() |
Aggregation pipeline query |
| Vector search | Collection / Model vectorSearch() |
MongoDB Vector Search query with Model soft-delete visibility when applicable |
| Search indexes | Collection / Model createSearchIndex() and related methods |
Create, inspect, update, drop, and wait for Search indexes (search and vectorSearch types) |
| GridFS | msq.gridfs() / Model gridfs() |
Upload, download, and resume GridFS files |
| Document | Description |
|---|---|
| Chain query API | Chain query API |
| Chain method reference | Detailed chain method reference |
| Query plan analysis | Query plan analysis |
| Pagination bookmarks | Pagination bookmark management |
| Document | Description |
|---|---|
| Utility functions | Utility functions |
| Configuration reference | Constructor defaults, cache, Redis, Model, sync, pools, logging, and validation |
| Collection management | Collection management |
| Read preference | Read preference settings |
| Count queue | Count queue control for high-concurrency optimization |
| Write path policy | Configure whether writes may use collection APIs or must use Model APIs |
| Distributed deployment | Distributed deployment configuration |
| Document | Description |
|---|---|
| MongoDB driver compatibility | Detailed MongoDB driver compatibility notes |
| findOneAnd return values | Unified findOneAnd* return-value behavior |
| ESM support | ES Module (import) support |
Create
- Insert one document -
insertOne - Insert many documents -
insertMany - Batch insert -
insertBatch - Write operations guide - Complete write operations guide
Read
- Find documents -
find - Find one document -
findOne - Paginated find -
findPage - Count documents -
count - Distinct values -
distinct
Update
- Update methods overview - Method choice, traditional operators, and pipeline handoff
- Update one document -
updateOne - Update many documents -
updateMany - Replace one document -
replaceOne - Find one and update -
findOneAndUpdate - Find one and replace -
findOneAndReplace
Delete
- Delete one document -
deleteOne - Delete many documents -
deleteMany - Find one and delete -
findOneAndDelete
- Aggregation pipeline - Aggregation pipelines
- Vector search - MongoDB Vector Search queries
- Search indexes - Search index lifecycle (
searchandvectorSearchtypes) - GridFS - GridFS upload, download, and resumable upload
- Query plans - Query plans
- Chain queries - Chain queries
- Cache system - Cache system
- Pagination bookmarks - Pagination optimization
| Document | Description |
|---|---|
| Documentation index | Documentation directory index |
| Site home | Documentation site home |
| API reference index | Current API reference index |
| Installation | Installation and minimal connection validation |
| Basic usage | Common operations after the first connection succeeds |
| Examples | Example index |
| Common scenarios | Connection, cache, Redis, SSH, pool, and Model usage scenarios |
| Capability index | Capability index |
| Document | Description |
|---|---|
| Administration API | Administration API |
| Database operations | Database operations |
| Create one index | Create one index |
| Create indexes in bulk | Create indexes in bulk |
| Drop an index | Drop an index |
| List indexes | List indexes |
| GridFS | GridFS buckets, ranges, and resumable upload |
| Find and count | Find and count |
| Expression functions | Expression functions |
| Quick upsert | Quick upsert |
| Document | Description |
|---|---|
| Runtime consistency and boundaries | Runtime capability boundaries and consistency contracts |
| Production rollout | Index, one-time data, CDC, and production traffic-switch runbook |
| Production data migration | One-time filtered data and index release scenarios |
| Support matrix | Support matrix |
| Roadmap boundaries | Roadmap boundaries |
| Validation notes | Validation notes |
| Document | Description |
|---|---|
| ObjectId conversion scope | ObjectId conversion scope |
| ObjectId cross-version notes | ObjectId cross-version notes |
| ObjectId cross-version FAQ | ObjectId cross-version FAQ |
| ObjectId logging optimization | ObjectId logging optimization |
| Cache API | Database query cache, multi-layer cache access, invalidation, and statistics |
| Slow-query logging | Slow-query logging |
| Failure recovery examples | Failure recovery examples |
| Multi-pool health checks | Multi-pool health checks |
| Distributed deployment quick reference | Distributed deployment quick reference |
| Relations quick start | Relations quick start |
Recommended reading order for new users:
- Installation - Install, connect, and run the first query.
- Basic usage - Run common CRUD, pagination, cache, and Model entry-point examples.
- Configuration reference - Choose constructor options for the service.
- Connection management - Learn connection lifecycle and accessors.
- Find documents - Learn query details.
- Insert one document / Insert many documents - Learn inserts.
- Update one document / Update many documents - Learn updates.
- Delete one document / Delete many documents - Learn deletes.
- Cache system - Understand the cache mechanism.
- Transaction management - Learn transaction management.
- Distributed deployment - Multi-instance deployment for production.
- Production rollout - Index, one-time data, CDC, and traffic-switch checks.
- Production data migration - Configuration-driven release from instance A to production.