Create a new Monarch database instance
OptionalconfigOrAdapter: PersistenceAdapter | MonarchConfigEither a MonarchConfig object for dependency injection, or a PersistenceAdapter for backward compatibility
Authenticate a user
Authorize a permission for the current context
Check resource-level access
Clear all collections and data
Commit a transaction
Create a database snapshot
Create a stored procedure
Create a new user
Decrypt data
Delete a user
Encrypt data
Execute a script
Optionalcontext: anyOptionaloptions: { count?: number; withCoord?: boolean; withDist?: boolean }Optionaloptions: { count?: number; withCoord?: boolean; withDist?: boolean }Get change stream statistics
Get cluster statistics
Get all collection names
Get durability statistics
Get query optimization suggestions
Get the schema for a collection
Get security statistics
Get database statistics Uses aggregate method to avoid Law of Demeter violations
Get transaction status
Hash a password
Join a cluster
Leave the cluster
Load the database state using the configured adapter
Load an ML model
Load a script
Redistribute data across cluster
Remove a collection
Remove schema from a collection
Rollback a transaction
Run ML inference
Save the database state using the configured adapter
Optionalcount: numberTrain an ML model
Optionaloptions: anyOptionalfromTimestamp: numberOptionaltoTimestamp: numberRemove a change stream listener
Update user roles
Optionalmetadata: Record<string, any>Validate a document against a collection's schema
Verify a password
Add a change stream listener
Optional_count: numberOptionalcount: numberOptionalwithScores: booleanOptionalwithScores: booleanStaticcreateStaticcreateCreate an IndexedDBAdapter for browsers
OptionaldbName: stringOptionalstoreName: stringAuthorize a permission for the current context
Decrypt data
Encrypt data
Monarch Database - Enterprise-Grade In-Memory Database
Refactored from god object pattern into focused, modular components:
Supports dependency injection for better testability and flexibility.