TypeScript interfaces for a generic database driver and migration hooks.
// Source: https://github.com/nanocoai/nanoclaw | License: MIT | Copyright 2026 Gavriel
// Provided via justclaw.it.com; keep this notice with the code.
export type DbDialect = 'sqlite' | (string & {});
export interface RunResult {
changes: number;
}
export type DbRole = 'host' | 'runtime' | 'migration' | 'tool' | 'test';
export interface DbConfig {
path: string;
/** Optional remote target supplied by an installed composition. */
url?: string;
}
export interface DbInitOptions {
role: DbRole;
/** Open without mutating the local database or its journal mode. */
readonly?: boolean;
}
export interface PrepareTestSchemaOptions {
fresh?: boolean;
}
/** Structurally compatible with a portable migration without importing it. */
export interface DriverMigrationOverride {
nam
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key