@summa-ledger/kysely-adapter
v0.2.2
Published
> **Warning** > This package is under active development and in a **highly experimental stage**. APIs may change without notice. Extensive testing is still pending — **do not use in production** until a stable release is announced.
Readme
@summa-ledger/kysely-adapter
Warning This package is under active development and in a highly experimental stage. APIs may change without notice. Extensive testing is still pending — do not use in production until a stable release is announced.
Kysely database adapter for the Summa ledger.
Installation
npm install @summa-ledger/kysely-adapter kyselyUsage
import { createSumma } from "@summa-ledger/summa";
import { kyselyAdapter } from "@summa-ledger/kysely-adapter";
import { Kysely, PostgresDialect } from "kysely";
import { Pool } from "pg";
const db = new Kysely({
dialect: new PostgresDialect({ pool: new Pool() }),
});
const summa = createSumma({
database: kyselyAdapter(db),
currency: "USD",
systemAccounts: { world: "@World" },
});Connection Pooling
The package exports createPooledAdapter and RECOMMENDED_POOL_CONFIG for production-ready pool management:
import {
createPooledAdapter,
RECOMMENDED_POOL_CONFIG,
} from "@summa-ledger/kysely-adapter";Peer Dependencies
kysely^0.27.0 || ^0.28.0
Documentation
Full documentation available at https://summa.dev.
License
MIT
