This page lists the stable capability entry points in the current TypeScript version of monSQLize.
monSQLize is a database-native production data runtime layer. The current stable adapter is MongoDB; MySQL and PostgreSQL are planned as future adapters and are not part of the current npm runtime.
Principles:
- Start with the API entry points users can call.
- Then point to the corresponding documentation and runnable examples.
| Layer | Current status | Scope |
|---|---|---|
| Shared runtime | Stable where exposed by the current runtime | Database cache, pools, transactions, model constraints, sync, slow-query logging, and runtime diagnostics |
| MongoDB adapter | Stable | collection(), db(), use(), pool(), query/write helpers, aggregation, indexes, Search indexes, GridFS, transactions, Change Streams |
| MySQL adapter | Planned / in development | Future database-native adapter, no current public runtime API |
| PostgreSQL adapter | Planned / in development | Future database-native adapter, no current public runtime API |
| Capability | Recommended entry | Notes |
|---|---|---|
| Model | msq.model() / MonSQLize.Model |
Supports model registration, relations, virtuals, populate, and common query entries |
| write-path-policy | writePathPolicy |
Optional runtime guard for Model-only write namespaces, including the gridfs category |
| GridFS | msq.gridfs() / model.gridfs() |
Upload, download, and phase-1 resumable GridFS upload. See GridFS |
| Search index and vector search | createSearchIndex() / vectorSearch() |
Search index lifecycle for types search and vectorSearch, then vector queries. See Search indexes and vectorSearch() |
| cache | Query cache options / msq.cache |
Database query cache, multi-layer cache access, invalidation, and statistics |
| transaction | startSession() / withTransaction() |
Supports MongoDB transaction wrappers and transaction statistics |
| pool | pools / pool() / ConnectionPoolManager |
Declare pools: PoolConfig[] in the constructor, route with pool(), and use the low-level manager for advanced inspection or manual management |
| sync | startSync() / stopSync() / getSyncStats() |
Supports Change Stream sync start, stop, and status inspection |
| slow-query-log | recordSlowQuery() / getSlowQueryLogs() |
Supports slow-query recording, querying, and runtime management |
Available entries:
Model.define/get/list/undefine/redefinemsq.model()- relations / virtuals / populate
- common model queries such as
findOne()andfindAndCount()
Model documentation and examples:
- Docs: Model Overview, Populate, Relations, Nested Populate
- Examples: model.ts, populate-relations.ts
Available entries:
writePathPolicy.defaultwritePathPolicy.namespacesWritePathPolicyOptions
Use this when selected namespaces should be written through msq.model() instead of direct collection() writes. See Write Path Policy. GridFS writes use the gridfs field and are documented in GridFS.
Available entries:
startSession()withTransaction()
Good first-use cases:
- Identifying the transaction wrapper entry.
- Inspecting transaction retry, timeout, and statistics behavior.
Available entries:
pool()ConnectionPoolManagerpools/poolStrategy/poolFallback/maxPoolsCount
This is the current entry point for:
- Multi-pool onboarding.
- Configuration contract and runtime routing explanations.
Available entries:
- sync: contract / manager / lifecycle
- slow-query-log: manager / queue / runtime façade
These capabilities include topic pages and runnable examples:
- sync: Change Stream Sync, examples sync.ts and sync-target-failure.ts
- slow-query-log: Slow Query Logging, example slow-query-log.ts
For deployment and failure behavior, continue with Distributed Deployment, Production Rollout, and Failure Recovery Examples.
- Documentation home: README
- API index: API Index
- Example index: Examples
- Runnable examples: examples/docs
- Model path: Model Overview, Relations, Populate
- Transaction path: Transactions, Transaction Optimizations
- Pool and deployment path: Pool Configuration, Pool Chain API, Production Rollout
- Cache path: Cache Configuration, Cache Creation, Cache Invalidation
- Sync and observability path: Change Stream Sync, Production Rollout, Slow Query Logging