/** * Output column aliases for `QueryBuilderOptions.aliases`. * * `{ email_addr: 'email' }` reads alias → source column, and makes SELECT emit * `email AS email_addr`. This is an *output* rename only: filters, sorting and * grouping keep using the real column name, so the alias never has to be * whitelisted or resolved back to a column. */ /** Source column → the aliases declared for it (a column may have several). */ export type AliasMap = ReadonlyMap; /** * Validate the alias option and invert it into a column → aliases lookup. * * Returns `null` when no aliases are declared, so the common path can skip the * alias branch entirely. * * @throws Error on an alias or target column that is not a bare identifier * @throws InvalidColumnError when strict and the target is not whitelisted */ export declare function buildAliasMap(aliases: Record, whitelist: readonly string[], whitelistSet: ReadonlySet, strict: boolean): AliasMap | null; /** * Apply aliases to an explicit projection (from `select()` / `exclude()`). * * An aliased column is renamed in place — emitted once per alias as * `col AS alias` — and every other field passes through untouched. A column * that is not part of the projection contributes nothing. */ export declare function aliasProjection(fields: readonly string[], map: AliasMap): string[]; /** * Build the projection for a query with no explicit `select()` / `exclude()`. * * There is no field list to rename in place, so `*` is kept and the aliased * columns are appended: `SELECT *, email AS email_addr`. The source column * therefore stays in the result set alongside its renamed copy. */ export declare function aliasStarProjection(map: AliasMap): string[]; //# sourceMappingURL=column-aliases.d.ts.map