Use Grove instead.
Overview01
github.com/xraph/forge/extensions/database provides a unified extension for:
SQL databases via Bun (
postgres,mysql,sqlite)MongoDB
Redis (standalone, cluster, sentinel)
The extension registers a DatabaseManager and database accessors in the container, then coordinates connection lifecycle.
What This Extension Handles02
Config loading from app config (
extensions.databasethendatabase) plus programmatic optionsDatabase object creation by
DatabaseTypeEager registration/opening of configured databases through
DatabaseManagerDefault database selection
Typed helper access for SQL, Mongo, and Redis
Runtime Model03
DatabaseManageris the central registry for named databases.Database connections are opened with retry and backoff logic.
Health checks and metrics are emitted per database.
DatabaseManagerimplements service lifecycle methods (Start,Stop,Health).
Read This Next04
Create a working setup quickly with typed injection and named database access.
Complete feature map including pooling, retries, observability, and helper layers.
Config schema, defaults, validation behavior, and config merge precedence.
How manager and accessors are registered and resolved through Vessel.
SQL, MongoDB, and Redis backend behavior and DSN patterns.
Generic repository usage, query options, and offset/cursor pagination.
Nested transactions with savepoints and transaction-aware DB resolution.
Migration manager and idempotent seed orchestration.
In-memory test DB helpers and fixture assertions.
Grouped function reference for extension, manager, helpers, and data APIs.
Fix common startup, typing, and transaction issues.