react-native-nitro-sqlite
Version:
Fast SQLite library for React Native built using Nitro Modules
20 lines • 1.08 kB
TypeScript
import type { QueryResult, Transaction, SQLiteQueryParams, QueryResultRow } from './types';
interface TypeOrmNitroSQLiteConnection {
executeSql: <RowData extends QueryResultRow = never>(sql: string, params: SQLiteQueryParams | undefined, okExecute: (res: QueryResult<RowData>) => void, failExecute: (msg: string) => void) => Promise<void>;
transaction: (fn: (tx: Transaction) => Promise<void>) => Promise<void>;
close: (okClose: () => void, failClose: (e: unknown) => void) => void;
attach: (dbNameToAttach: string, alias: string, location: string | undefined, callback: () => void) => void;
detach: (alias: string, callback: () => void) => void;
}
/**
* DO NOT USE THIS! THIS IS MEANT FOR TYPEORM
* If you are looking for a convenience wrapper use `connect`
*/
export declare const typeORMDriver: {
openDatabase: (options: {
name: string;
location?: string;
}, ok: (db: TypeOrmNitroSQLiteConnection) => void, fail: (msg: string) => void) => TypeOrmNitroSQLiteConnection | null;
};
export {};
//# sourceMappingURL=typeORM.d.ts.map