import { Kysely, SelectQueryBuilder } from 'kysely'; import { ParametersObject } from 'kysely-params'; import { SelectionColumn } from '../lib/type-utils.js'; import { ParameterizableMappingQuery } from './parameterizable-query.js'; import { SelectTransform } from '../mappers/table-mapper-transforms.js'; /** * Compiling mapping query for selecting rows from a database table. */ export declare class CompilingMappingSelectQuery[]> | ['*'], SelectedObject, QB extends SelectQueryBuilder, Parameters extends ParametersObject> implements ParameterizableMappingQuery { #private; readonly db: Kysely; protected readonly transforms: Readonly>; constructor(db: Kysely, qb: QB, transforms: Readonly>); /** * Retrieves zero or more rows from the table, using `selectTransform` * (if provided) to map the rows to objects of type `SelectedObject`. * Accepts values for any parameters embedded in the query. * * On the first execution, compiles and discards the underlying Kysely * query builder. Subsequent executions reuse the compiled query. * @param params Record characterizing the parameter names and types. * Pass in `{}` if the query has no parameters. * @returns An array of objects for the selected rows, possibly empty. */ returnAll(params: Parameters): Promise; /** * Retrieves a single row from the table, using `selectTransform` (if * provided) to map the row to an object of type `SelectedObject`. * Accepts values for any parameters embedded in the query. * * On the first execution, compiles and discards the underlying Kysely * query builder. Subsequent executions reuse the compiled query. * @param params Record characterizing the parameter names and types. * Pass in `{}` if the query has no parameters. * @returns An object for the selected rows, or null if not found. */ returnOne(params: Parameters): Promise; } //# sourceMappingURL=compiling-select-query.d.ts.map