import { SQLiteParams } from './SQLiteTypes'; import { IDatabaseHandle } from './IDatabaseHandle'; import { SQLiteParamAdapter } from './SQLiteParamAdapter'; /** * Before v0.2.0 TParams can hold anything, as long as you filtered out * non-query parameters inside _getParameters. * * @since v0.2.0 * * TParams must only contain query parameters. Additional query options can be passed * as an another argument if desired. Implementing _getParameters is now optional * and the default implementation of it will automatically convert several * well known types into the appropriate SQLite type. * * Custom type adaptions can be implemented by providing a custom SQLiteParamAdapter. * * If you can guarentee that the TParams consists of only valid SQLite Types, then * the overriding _getParameters can be used to skip the adaption step, which might be * a significant performance gain on large param queries, such as bulk inserts. * * @example * ```typescript * protected override _getParameters(params: TParams): SQLiteParams { * return params; * } * ``` */ export declare abstract class Query { private $params; private $paramAdapter; constructor(params: TParams); /** * @since v0.2.0 * @returns */ protected _createParamAdapter(): SQLiteParamAdapter; protected _validateParameterNames(params: SQLiteParams): void; abstract getQuery(): string; /** * Returns the parameters as given to the Query * @returns */ getParams(): TParams; /** * Implement to translate unknown parameter types into valid SQL data types * @param params * @returns */ protected _getParameters(params: TParams): Promise; /** * @internal function that controls which native API to call. Don't touch this. */ protected _getNativeMethod(): string; execute(db: IDatabaseHandle): Promise; }