Skip to content

Latest commit

 

History

History
109 lines (73 loc) · 5.72 KB

capability-index.md

File metadata and controls

109 lines (73 loc) · 5.72 KB

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

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

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.

6. Recommended Entries in This Repository

  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