import { DeleteQueryBuilder, DeleteResult, Kysely } from 'kysely'; import { ParametersObject } from 'kysely-params'; import { ParameterizableMappingQuery } from './parameterizable-query.js'; import { CompilingMappingDeleteQuery } from './compiling-delete-query.js'; import { CountTransform } from '../mappers/table-mapper-transforms.js'; /** * Mapping query for deleting rows from a database table. */ export declare class MappingDeleteQuery, ReturnCount> implements ParameterizableMappingQuery { protected readonly db: Kysely; protected readonly qb: QB; protected readonly transforms: Readonly>; constructor(db: Kysely, qb: QB, transforms: Readonly>); /** * Returns a compiling query that can be executed multiple times with * different parameters (if any parameters were provided), but which only * compiles the underlying Kysely query builder on the first execution. * Frees the query builder on the first execution to reduce memory usage. * @typeParam Parameters Record characterizing the parameter names and * types that were previously embedded in the query, if any. * @returns A compiling delete query. */ compile = {}>(): CompilingMappingDeleteQuery; /** * Runs the query, returning the number of rows deleted, converted to * the required client representation. * @returns Number of rows deleted, in client-requested representation. */ returnCount(): Promise; /** * Modifies the underlying Kysely query builder. * @param factory A function that takes the current query builder and * returns a new query builder. */ modify>(factory: (qb: QB) => NextQB): MappingDeleteQuery; /** * Runs the query, deleting the indicated rows, returning nothing. * @returns `true` if any rows were deleted, `false` otherwise. */ run(): Promise; } //# sourceMappingURL=delete-query.d.ts.map