mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
export interface DatabaseAdapter {
|
|
prepare(sql: string): PreparedStatement;
|
|
exec(sql: string): void;
|
|
close(): void;
|
|
pragma(key: string, value?: any): any;
|
|
readonly inTransaction: boolean;
|
|
transaction<T>(fn: () => T): T;
|
|
checkFTS5Support(): boolean;
|
|
}
|
|
export interface PreparedStatement {
|
|
run(...params: any[]): RunResult;
|
|
get(...params: any[]): any;
|
|
all(...params: any[]): any[];
|
|
iterate(...params: any[]): IterableIterator<any>;
|
|
pluck(toggle?: boolean): this;
|
|
expand(toggle?: boolean): this;
|
|
raw(toggle?: boolean): this;
|
|
columns(): ColumnDefinition[];
|
|
bind(...params: any[]): this;
|
|
}
|
|
export interface RunResult {
|
|
changes: number;
|
|
lastInsertRowid: number | bigint;
|
|
}
|
|
export interface ColumnDefinition {
|
|
name: string;
|
|
column: string | null;
|
|
table: string | null;
|
|
database: string | null;
|
|
type: string | null;
|
|
}
|
|
export declare function createDatabaseAdapter(dbPath: string): Promise<DatabaseAdapter>;
|
|
//# sourceMappingURL=database-adapter.d.ts.map
|