/* tslint:disable */
/* eslint-disable */

/**
 * An open in-memory SQLite database, callable from JS.
 *
 * ```js
 * import init, { Sqlite } from "./pkg/qubes_sqlite.js";
 * await init();
 * const db = new Sqlite();
 * db.execBatch("CREATE TABLE t(a INTEGER, b TEXT);");
 * db.run("INSERT INTO t VALUES (?, ?)", [1, "hi"]);
 * const { columns, rows } = db.query("SELECT * FROM t WHERE a = ?", [1]);
 * ```
 */
export class Sqlite {
    free(): void;
    [Symbol.dispose](): void;
    /**
     * Execute one or more `;`-separated statements with no parameters and
     * no result rows (DDL / batch setup).
     */
    execBatch(sql: string): void;
    /**
     * Serialize the whole database to a SQLite file image (a `Uint8Array`
     * of the `.sqlite` bytes) — for download/save.
     */
    exportDatabase(): Uint8Array;
    /**
     * Open a database from a serialized SQLite image (e.g. an uploaded
     * `.sqlite` file's bytes). Static: `Sqlite.fromBytes(uint8array)`.
     */
    static fromBytes(bytes: Uint8Array): Sqlite;
    /**
     * Open a fresh in-memory database.
     */
    constructor();
    /**
     * Run a row-producing statement. `params` is a JS array of values
     * (`null`, number, bigint, boolean, string, or `Uint8Array`).
     * Returns `{ columns: string[], rows: any[][] }`.
     */
    query(sql: string, params: any): any;
    /**
     * Run a row-less statement (`INSERT`/`UPDATE`/`DELETE`). `params` is a
     * JS array as in [`query`]. Returns
     * `{ changes: number, lastInsertRowid: number }`.
     */
    run(sql: string, params: any): any;
}

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
    readonly memory: WebAssembly.Memory;
    readonly __wbg_sqlite_free: (a: number, b: number) => void;
    readonly sqlite_execBatch: (a: number, b: number, c: number, d: number) => void;
    readonly sqlite_exportDatabase: (a: number, b: number) => void;
    readonly sqlite_fromBytes: (a: number, b: number, c: number) => void;
    readonly sqlite_new: (a: number) => void;
    readonly sqlite_query: (a: number, b: number, c: number, d: number, e: number) => void;
    readonly sqlite_run: (a: number, b: number, c: number, d: number, e: number) => void;
    readonly uuid4_str: (a: number, b: number, c: number) => void;
    readonly uuid4_blob: (a: number, b: number, c: number) => void;
    readonly uuid7_str: (a: number, b: number, c: number) => void;
    readonly uuid7: (a: number, b: number, c: number) => void;
    readonly uuid7_ts: (a: number, b: number, c: number) => void;
    readonly uuid_str: (a: number, b: number, c: number) => void;
    readonly uuid_blob: (a: number, b: number, c: number) => void;
    readonly time_now: (a: number, b: number, c: number) => void;
    readonly time_date: (a: number, b: number, c: number) => void;
    readonly make_date: (a: number, b: number, c: number) => void;
    readonly make_timestamp: (a: number, b: number, c: number) => void;
    readonly time_get: (a: number, b: number, c: number) => void;
    readonly time_get_year: (a: number, b: number, c: number) => void;
    readonly time_get_month: (a: number, b: number, c: number) => void;
    readonly time_get_day: (a: number, b: number, c: number) => void;
    readonly time_get_hour: (a: number, b: number, c: number) => void;
    readonly time_get_minute: (a: number, b: number, c: number) => void;
    readonly time_get_second: (a: number, b: number, c: number) => void;
    readonly time_get_nano: (a: number, b: number, c: number) => void;
    readonly time_get_weekday: (a: number, b: number, c: number) => void;
    readonly time_get_yearday: (a: number, b: number, c: number) => void;
    readonly time_get_isoyear: (a: number, b: number, c: number) => void;
    readonly time_get_isoweek: (a: number, b: number, c: number) => void;
    readonly time_unix: (a: number, b: number, c: number) => void;
    readonly to_timestamp: (a: number, b: number, c: number) => void;
    readonly time_milli: (a: number, b: number, c: number) => void;
    readonly time_micro: (a: number, b: number, c: number) => void;
    readonly time_nano: (a: number, b: number, c: number) => void;
    readonly time_to_unix: (a: number, b: number, c: number) => void;
    readonly time_to_milli: (a: number, b: number, c: number) => void;
    readonly time_to_micro: (a: number, b: number, c: number) => void;
    readonly time_to_nano: (a: number, b: number, c: number) => void;
    readonly time_after: (a: number, b: number, c: number) => void;
    readonly time_before: (a: number, b: number, c: number) => void;
    readonly time_compare: (a: number, b: number, c: number) => void;
    readonly time_equal: (a: number, b: number, c: number) => void;
    readonly dur_ns: (a: number, b: number, c: number) => void;
    readonly dur_us: (a: number, b: number, c: number) => void;
    readonly dur_ms: (a: number, b: number, c: number) => void;
    readonly dur_s: (a: number, b: number, c: number) => void;
    readonly dur_m: (a: number, b: number, c: number) => void;
    readonly dur_h: (a: number, b: number, c: number) => void;
    readonly time_add: (a: number, b: number, c: number) => void;
    readonly time_add_date: (a: number, b: number, c: number) => void;
    readonly time_sub: (a: number, b: number, c: number) => void;
    readonly time_since: (a: number, b: number, c: number) => void;
    readonly time_until: (a: number, b: number, c: number) => void;
    readonly time_trunc: (a: number, b: number, c: number) => void;
    readonly time_round: (a: number, b: number, c: number) => void;
    readonly time_fmt_iso: (a: number, b: number, c: number) => void;
    readonly time_fmt_datetime: (a: number, b: number, c: number) => void;
    readonly time_fmt_date: (a: number, b: number, c: number) => void;
    readonly time_fmt_time: (a: number, b: number, c: number) => void;
    readonly time_parse: (a: number, b: number, c: number) => void;
    readonly regexp: (a: number, b: number, c: number) => void;
    readonly register_dur_h: (a: number) => number;
    readonly register_dur_m: (a: number) => number;
    readonly register_dur_ms: (a: number) => number;
    readonly register_dur_ns: (a: number) => number;
    readonly register_dur_s: (a: number) => number;
    readonly register_dur_us: (a: number) => number;
    readonly register_make_date: (a: number) => number;
    readonly register_make_timestamp: (a: number) => number;
    readonly register_regexp: (a: number) => number;
    readonly register_time_add: (a: number) => number;
    readonly register_time_add_date: (a: number) => number;
    readonly register_time_after: (a: number) => number;
    readonly register_time_before: (a: number) => number;
    readonly register_time_compare: (a: number) => number;
    readonly register_time_date: (a: number) => number;
    readonly register_time_equal: (a: number) => number;
    readonly register_time_fmt_date: (a: number) => number;
    readonly register_time_fmt_datetime: (a: number) => number;
    readonly register_time_fmt_iso: (a: number) => number;
    readonly register_time_fmt_time: (a: number) => number;
    readonly register_time_get: (a: number) => number;
    readonly register_time_get_day: (a: number) => number;
    readonly register_time_get_hour: (a: number) => number;
    readonly register_time_get_isoweek: (a: number) => number;
    readonly register_time_get_isoyear: (a: number) => number;
    readonly register_time_get_minute: (a: number) => number;
    readonly register_time_get_month: (a: number) => number;
    readonly register_time_get_nano: (a: number) => number;
    readonly register_time_get_second: (a: number) => number;
    readonly register_time_get_weekday: (a: number) => number;
    readonly register_time_get_year: (a: number) => number;
    readonly register_time_get_yearday: (a: number) => number;
    readonly register_time_micro: (a: number) => number;
    readonly register_time_milli: (a: number) => number;
    readonly register_time_nano: (a: number) => number;
    readonly register_time_now: (a: number) => number;
    readonly register_time_parse: (a: number) => number;
    readonly register_time_round: (a: number) => number;
    readonly register_time_since: (a: number) => number;
    readonly register_time_sub: (a: number) => number;
    readonly register_time_to_micro: (a: number) => number;
    readonly register_time_to_milli: (a: number) => number;
    readonly register_time_to_nano: (a: number) => number;
    readonly register_time_to_unix: (a: number) => number;
    readonly register_time_trunc: (a: number) => number;
    readonly register_time_unix: (a: number) => number;
    readonly register_time_until: (a: number) => number;
    readonly register_to_timestamp: (a: number) => number;
    readonly register_uuid4_blob: (a: number) => number;
    readonly register_uuid4_str: (a: number) => number;
    readonly register_uuid7: (a: number) => number;
    readonly register_uuid7_str: (a: number) => number;
    readonly register_uuid7_ts: (a: number) => number;
    readonly register_uuid_blob: (a: number) => number;
    readonly register_uuid_str: (a: number) => number;
    readonly __wbindgen_export: (a: number, b: number) => number;
    readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
    readonly __wbindgen_export3: (a: number) => void;
    readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
    readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;

/**
 * Instantiates the given `module`, which can either be bytes or
 * a precompiled `WebAssembly.Module`.
 *
 * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
 *
 * @returns {InitOutput}
 */
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
 * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
 * for everything else, calls `WebAssembly.instantiate` directly.
 *
 * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
 *
 * @returns {Promise<InitOutput>}
 */
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
