Advanced Capability Index

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.

Current Capability Overview

LayerCurrent statusScope
Shared runtimeStable where exposed by the current runtimeDatabase cache, pools, transactions, model constraints, sync, slow-query logging, and runtime diagnostics
MongoDB adapterStablecollection(), db(), use(), pool(), query/write helpers, aggregation, indexes, Search indexes, GridFS, transactions, Change Streams
MySQL adapterPlanned / in developmentFuture database-native adapter, no current public runtime API
PostgreSQL adapterPlanned / in developmentFuture database-native adapter, no current public runtime API
CapabilityRecommended entryNotes
Modelmsq.model() / MonSQLize.ModelSupports model registration, relations, virtuals, populate, and common query entries
write-path-policywritePathPolicyOptional runtime guard for Model-only write namespaces, including the gridfs category
GridFSmsq.gridfs() / model.gridfs()Upload, download, and phase-1 resumable GridFS upload. See GridFS
cacheQuery cache options / msq.cacheDatabase query cache, multi-layer cache access, invalidation, and statistics
transactionstartSession() / withTransaction()Supports MongoDB transaction wrappers and transaction statistics
poolpools / pool() / ConnectionPoolManagerDeclare pools: PoolConfig[] in the constructor, route with pool(), and use the low-level manager for advanced inspection or manual management
syncstartSync() / stopSync() / getSyncStats()Supports Change Stream sync start, stop, and status inspection
slow-query-logrecordSlowQuery() / getSlowQueryLogs()Supports slow-query recording, querying, and runtime management

1. Model

Available entries:

  • Model.define/get/list/undefine/redefine
  • msq.model()
  • relations / virtuals / populate
  • common model queries such as findOne() and findAndCount()

Model documentation and examples:

2. write-path-policy

Available entries:

  • writePathPolicy.default
  • writePathPolicy.namespaces
  • WritePathPolicyOptions

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.

3. transaction

Available entries:

  • startSession()
  • withTransaction()

Good first-use cases:

  • Identifying the transaction wrapper entry.
  • Inspecting transaction retry, timeout, and statistics behavior.

4. pool

Available entries:

  • pool()
  • ConnectionPoolManager
  • pools / poolStrategy / poolFallback / maxPoolsCount

This is the current entry point for:

  • Multi-pool onboarding.
  • Configuration contract and runtime routing explanations.

5. sync / slow-query-log

Available entries:

  • sync: contract / manager / lifecycle
  • slow-query-log: manager / queue / runtime façade

These capabilities include topic pages and runnable examples:

For deployment and failure behavior, continue with Distributed Deployment, Production Rollout, and Failure Recovery Examples.

  1. Documentation home: README
  2. API index: API Index
  3. Example index: Examples
  4. Runnable examples: examples/docs

7. Common Reading Paths

  1. Model path: Model Overview, Relations, Populate
  2. Transaction path: Transactions, Transaction Optimizations
  3. Pool and deployment path: Pool Configuration, Pool Chain API, Production Rollout
  4. Cache path: Cache Configuration, Cache Creation, Cache Invalidation
  5. Sync and observability path: Change Stream Sync, Production Rollout, Slow Query Logging