UNPKG

@athenox/talos

Version:

Talos: a backend you describe instead of write. Declare a schema, write the rules in plain language, map URLs to sentences; a small built-in model turns them into query plans.

19 lines (18 loc) • 595 B
import type { Store } from './runtime.ts'; /** * A Store over a SQLite handle — better-sqlite3's `Database` or Node's * `DatabaseSync`, which share `prepare(sql).all/run`. */ export declare function sqliteStore(db: { prepare(sql: string): { all(...p: any[]): unknown[]; run(...p: any[]): { changes: number | bigint; lastInsertRowid: number | bigint; }; }; }): Store; /** A Store over a mysql2/promise pool (MySQL, MariaDB). */ export declare function mysqlStore(pool: { query(sql: string, p?: unknown[]): Promise<any>; }): Store;