import ConnectionSqlJs from "./connection-sql-js.js"; import Base from "./base.js"; export type SqliteWebConnection = { query: (sql: string) => Promise>[]>; affectedRows: (sql: string) => Promise; close: () => Promise; }; /** * VelociousDatabaseDriversSqliteWeb class. * @typedef {{query: (sql: string) => Promise>[]>, affectedRows: (sql: string) => Promise, close: () => Promise}} SqliteWebConnection */ export default class VelociousDatabaseDriversSqliteWeb extends Base { args: import("../../../configuration-types.js").DatabaseConfigurationType | undefined; /** * Connection. * @type {ConnectionSqlJs | undefined} */ _connection: ConnectionSqlJs | undefined; /** @type {SqliteWebConnection | undefined} */ _externalConnection: SqliteWebConnection | undefined; /** * Runs sql js locate file. * @returns {(file: string) => string} - locateFile callback for sql.js. */ sqlJsLocateFile(): (file: string) => string; connect(): Promise; _close(): Promise; /** * Flushes pending SQL.js local persistence writes. * @returns {Promise} - Resolves when pending writes are durable. */ flushPendingWrites(): Promise; hasPendingWrites(): boolean; deleteDatabaseStorage(): Promise; /** * Starts an outer transaction after draining SQL.js persistence admission. * @param {Pick} [options] - Transaction ownership. * @returns {Promise} - Resolves when the transaction starts. */ startTransaction(options?: Pick): Promise; /** * Coordinates SQL BEGIN with active and queued persistence exports. * @param {Pick} [options] - Transaction ownership. * @returns {Promise} - Resolves when the transaction starts. */ _startTransactionAction(options?: Pick): Promise; /** * Commits and persists bytes after the outermost SQL.js transaction closes. * @param {Pick} [options] - Transaction ownership. * @returns {Promise} - Resolves when committed bytes are persisted. */ commitTransaction(options?: Pick): Promise; /** * Rolls back and persists bytes after the outermost SQL.js transaction closes. * @param {Pick} [options] - Transaction ownership. * @returns {Promise} - Resolves when rolled-back bytes are persisted. */ rollbackTransaction(options?: Pick): Promise; /** * Runs get connection. * @returns {ConnectionSqlJs | SqliteWebConnection} - The connection. */ getConnection(): ConnectionSqlJs | SqliteWebConnection; localStorageName(): string; /** * Returns the configured database name. * @returns {string} - Database name. */ databaseName(): string; /** * Runs query actual. * @param {string} sql - SQL string. * @param {import("../base.js").QueryOptions} [options] - Query options. * @returns {Promise>[]>} - Resolves with the query actual. */ _queryActual(sql: string, options?: import("../base.js").QueryOptions): Promise>[]>; /** * Executes a mutation with affected-row metadata. * @param {string} sql - Mutation SQL. * @returns {Promise} - Affected row count. */ _affectedRowsActual(sql: string): Promise; } //# sourceMappingURL=index.web.d.ts.map