import type { DriverSpecs } from './Driver.js'; import type { Emitter } from './Emitter.js'; import { type HasSql, internalSql } from './Internal.js'; import type { Runtime } from './MetaData.js'; import type { FieldData } from './expr/Field.js'; import type { JsonPath } from './expr/Json.js'; export type Decoder = ((value: unknown) => T) | { mapFromDriverValue?(value: unknown, specs: DriverSpecs): T; }; export declare class Sql implements HasSql { emit: (emitter: Emitter) => void; static SELF_TARGET: string; private brand; alias?: string; mapFromDriverValue?: (input: unknown, specs: DriverSpecs) => Value; readonly [internalSql]: this; constructor(emit?: (emitter: Emitter) => void); as(name: string): Sql; mapWith(decoder: Decoder): Sql; inlineFields(withTableName: boolean): Sql; inlineValues(): Sql; nameSelf(name: string): Sql; forSelection(): Sql; } export declare function sql(strings: TemplateStringsArray, ...inner: Array): Sql; export declare namespace sql { export function empty(): Sql; export function unsafe(directSql: string | number): Sql; export function value(value: T): Sql; export function inline(value: T): Sql; export function placeholder(name: string): Sql; export function identifier(identifier: string): Sql; export function field(field: FieldData): Sql; export function jsonPath(path: JsonPath): Sql; export function universal(runtimes: Partial>>): Sql; type QueryChunk = HasSql | undefined; export function query(...chunks: Array>>): Sql; export function join(items: Array, separator?: Sql): Sql; export {}; }