Files
Folo/packages/internal/database/src/db.ts
T

18 lines
637 B
TypeScript

import type { BaseSQLiteDatabase } from "drizzle-orm/sqlite-core"
import type * as schema from "./schemas"
import type { DB } from "./types"
export declare const sqlite: unknown
export declare const db: DB
export declare function initializeDB(): Promise<void>
export declare function migrateDB(): Promise<void>
export declare function getDBFile(): Promise<Blob>
export declare function exportDB(): Promise<void>
/**
* Deletes the database file, normally you should reload the app after calling this function.
*/
export declare function deleteDB(): Promise<void>
export type AsyncDb = BaseSQLiteDatabase<"async", any, typeof schema>