import { ObjectLiteral } from "../../common/ObjectLiteral"; import { ColumnSchema } from "../../schema-builder/schema/ColumnSchema"; import { TableSchema } from "../../schema-builder/schema/TableSchema"; import { InsertResult } from "../InsertResult"; import { AbstractSqliteQueryRunner } from "../sqlite-abstract/AbstractSqliteQueryRunner"; import { WebsqlDriver } from "./WebsqlDriver"; /** * Runs queries on a single websql database connection. */ export declare class WebsqlQueryRunner extends AbstractSqliteQueryRunner { /** * Real database connection from a connection pool used to perform queries. */ protected databaseConnection: any; /** * Promise used to obtain a database connection for a first time. */ protected databaseConnectionPromise: Promise; /** * Database driver used by connection. */ driver: WebsqlDriver; constructor(driver: WebsqlDriver); /** * Creates/uses database connection from the connection pool to perform further operations. * Returns obtained database connection. */ connect(): Promise; /** * Starts transaction. */ startTransaction(): Promise; /** * Commits transaction. * Error will be thrown if transaction was not started. */ commitTransaction(): Promise; /** * Rollbacks transaction. * Error will be thrown if transaction was not started. */ rollbackTransaction(): Promise; /** * Executes a given SQL query. */ query(query: string, parameters?: any[]): Promise; /** * Insert a new row with given values into the given table. * Returns value of the generated column if given and generate column exist in the table. */ insert(tableName: string, keyValues: ObjectLiteral): Promise; /** * Loads all tables (with given names) from the database and creates a TableSchema from them. */ loadTableSchemas(tableNames: string[]): Promise; /** * Removes all tables from the currently connected database. */ clearDatabase(): Promise; /** * Builds a query for create column. */ protected buildCreateColumnSql(column: ColumnSchema): string; }