@coherent.js/database
v1.0.0-beta.5
Published
Database utilities and adapters for Coherent.js
Readme
@coherent.js/database
Database utilities and adapters for Coherent.js.
- ESM-only, Node 20+
- Optional adapters for popular databases
- Designed to pair with
@coherent.js/coreand server frameworks
For a high-level overview and repository-wide instructions, see the root README: ../../README.md
Installation
pnpm add @coherent.js/databaseOptional peer dependencies (install as needed):
sqlite3(optional)
Quick start
JavaScript (ESM):
// Import utilities from the package's public entry once you enable a specific adapter
import db from '@coherent.js/database';
// Example sketch: connect and query (adapter-specific APIs vary)
async function example() {
// const conn = await db.connect({ url: process.env.DATABASE_URL });
// const rows = await conn.query('select 1');
}TypeScript:
import db from '@coherent.js/database';
async function example(): Promise<void> {
// const conn = await db.connect({ url: process.env.DATABASE_URL! });
// const rows = await conn.query('select 1');
}Note: This package exposes a set of adapters and helpers. Refer to the repository docs and examples for concrete adapter APIs.
Development
Run tests for this package:
pnpm --filter @coherent.js/database run testWatch mode:
pnpm --filter @coherent.js/database run test:watchType check:
pnpm --filter @coherent.js/database run typecheckBuild:
pnpm --filter @coherent.js/database run buildLicense
MIT © Coherent.js Team
