Documentation
    Preparing search index...
    type DbExportsType = {
        add_fts_index: (
            table: string,
            column: string,
            language?: string,
            disable_fts?: boolean,
        ) => Promise<void>;
        add_index: (table: string, columns: string[]) => Promise<void>;
        add_unique_constraint: (
            table: string | undefined,
            columns: string[],
        ) => Promise<void>;
        begin: () => Promise<void>;
        changeConnection: (connectObj: any) => void;
        close: () => Promise<void>;
        commit: () => Promise<void>;
        commitAndBeginNewTransaction: () => Promise<void>;
        connectObj: GenObj;
        copyFrom: (
            readStream: ReadStream,
            table: string,
            fieldNames: any[],
            client: any,
        ) => Promise<any>;
        copyToJson?: (
            writeStream: WriteStream,
            table: string,
            opts?: any,
        ) => Promise<void>;
        count: (
            table: string,
            where?: Where,
            opts?: SelectOptions,
        ) => Promise<number>;
        delete: (table: string, where: Where) => Promise<any>;
        deleteWhere: (table: string, where: Where) => Promise<any>;
        drop_fts_index: (table: string) => Promise<void>;
        drop_index: (table: string, columns: string[]) => Promise<void>;
        drop_reset_schema: () => Promise<void>;
        drop_unique_constraint: (
            table: string | undefined,
            columns: string[],
        ) => Promise<void>;
        dropTable: (table: string) => Promise<any>;
        dropTables: (tables: string[]) => Promise<any>;
        enable_multi_tenant: () => void;
        get_db_filepath: () => string;
        get_sql_logging: () => boolean;
        getClient: () => Promise<any>;
        getRequestContext: () => {
            client?: object
            | string;
            req: { __: (str: string) => string; getLocale: () => string };
        };
        getTenantSchema: () => string;
        getTenantSchemaPrefix: () => string;
        getVersion: (arg?: boolean) => Promise<string>;
        insert: (table: string, data: GenObj, opts?: any) => Promise<any>;
        is_it_multi_tenant: () => boolean;
        is_node: boolean;
        is_sqlite: boolean;
        isSQLite: boolean;
        listScTables: () => Promise<any>;
        listTables: () => Promise<any>;
        listUserDefinedTables: () => Promise<any>;
        mkWhere: (q: Where) => any;
        query: (sql: string, params?: any) => Promise<any>;
        reset: () => Promise<void>;
        reset_sequence: (table: string, column?: string) => Promise<void>;
        rollback: () => Promise<void>;
        runWithTenant: (tenantId: string | RequestContext, fn: any) => Promise<any>;
        select: (
            table: string,
            where?: Where | string,
            opts?: SelectOptions,
        ) => Promise<any>;
        selectMaybeOne: (table: string, where: Where, opts?: any) => Promise<any>;
        selectOne: (
            table: string,
            where: Where,
            opts?: SelectOptions,
        ) => Promise<any>;
        set_sql_logging: (enabled: boolean) => void;
        setConnectionObject: (connectObj: any) => void;
        slugify: (str: string) => string;
        sqlsanitize: (s?: string) => string;
        tenant: typeof multi-tenant;
        time: () => Promise<Date>;
        truncate: (table: string) => Promise<void>;
        tryCatchInTransaction: <T>(
            fn: () => Promise<T>,
            onError?: (err: Error) => Promise<T | void> | T | void,
        ) => Promise<T>;
        update: (
            table: string,
            data: Row,
            id: PrimaryKeyValue | Row | undefined,
            opts?: any,
        ) => Promise<any>;
        updateWhere: (table: string, data: Row, where: Where) => Promise<any>;
        withTransaction: (
            fn: () => Promise<any>,
            onError?: (e: Error) => Promise<void>,
        ) => Promise<any>;
        [key: string]: any;
    }

    Indexable

    • [key: string]: any
    Index

    Properties

    add_fts_index: (
        table: string,
        column: string,
        language?: string,
        disable_fts?: boolean,
    ) => Promise<void>
    add_index: (table: string, columns: string[]) => Promise<void>
    add_unique_constraint: (
        table: string | undefined,
        columns: string[],
    ) => Promise<void>
    begin: () => Promise<void>
    changeConnection: (connectObj: any) => void
    close: () => Promise<void>
    commit: () => Promise<void>
    commitAndBeginNewTransaction: () => Promise<void>
    connectObj: GenObj
    copyFrom: (
        readStream: ReadStream,
        table: string,
        fieldNames: any[],
        client: any,
    ) => Promise<any>
    copyToJson?: (
        writeStream: WriteStream,
        table: string,
        opts?: any,
    ) => Promise<void>
    count: (table: string, where?: Where, opts?: SelectOptions) => Promise<number>
    delete: (table: string, where: Where) => Promise<any>
    deleteWhere: (table: string, where: Where) => Promise<any>
    drop_fts_index: (table: string) => Promise<void>
    drop_index: (table: string, columns: string[]) => Promise<void>
    drop_reset_schema: () => Promise<void>
    drop_unique_constraint: (
        table: string | undefined,
        columns: string[],
    ) => Promise<void>
    dropTable: (table: string) => Promise<any>
    dropTables: (tables: string[]) => Promise<any>
    enable_multi_tenant: () => void
    get_db_filepath: () => string
    get_sql_logging: () => boolean
    getClient: () => Promise<any>
    getRequestContext: () => {
        client?: object
        | string;
        req: { __: (str: string) => string; getLocale: () => string };
    }
    getTenantSchema: () => string
    getTenantSchemaPrefix: () => string
    getVersion: (arg?: boolean) => Promise<string>
    insert: (table: string, data: GenObj, opts?: any) => Promise<any>
    is_it_multi_tenant: () => boolean
    is_node: boolean
    is_sqlite: boolean
    isSQLite: boolean
    listScTables: () => Promise<any>
    listTables: () => Promise<any>
    listUserDefinedTables: () => Promise<any>
    mkWhere: (q: Where) => any
    query: (sql: string, params?: any) => Promise<any>
    reset: () => Promise<void>
    reset_sequence: (table: string, column?: string) => Promise<void>
    rollback: () => Promise<void>
    runWithTenant: (tenantId: string | RequestContext, fn: any) => Promise<any>
    select: (
        table: string,
        where?: Where | string,
        opts?: SelectOptions,
    ) => Promise<any>
    selectMaybeOne: (table: string, where: Where, opts?: any) => Promise<any>
    selectOne: (table: string, where: Where, opts?: SelectOptions) => Promise<any>
    set_sql_logging: (enabled: boolean) => void
    setConnectionObject: (connectObj: any) => void
    slugify: (str: string) => string
    sqlsanitize: (s?: string) => string
    tenant: typeof multi-tenant
    time: () => Promise<Date>
    truncate: (table: string) => Promise<void>
    tryCatchInTransaction: <T>(
        fn: () => Promise<T>,
        onError?: (err: Error) => Promise<T | void> | T | void,
    ) => Promise<T>
    update: (
        table: string,
        data: Row,
        id: PrimaryKeyValue | Row | undefined,
        opts?: any,
    ) => Promise<any>
    updateWhere: (table: string, data: Row, where: Where) => Promise<any>
    withTransaction: (
        fn: () => Promise<any>,
        onError?: (e: Error) => Promise<void>,
    ) => Promise<any>