import { AnyExpression, Condition } from '../../expressions'; import { Template } from '../../template'; import { FieldsConfig } from '../common/fields'; import { WithConfig } from '../common/with'; import { Query, QueryDefinition, Source, Table } from '../../source'; import { MapToExpression } from '../'; declare type InferInsertReturning = undefined extends T['returning'] ? {} : T['returning'] extends '*' ? T['into'] extends Source ? R : never : MapToExpression; export declare function INSERT(config: T): QueryDefinition<{ [K in keyof InferInsertReturning]: InferInsertReturning[K] extends AnyExpression, boolean, any>> ? InferInsertReturning[K] : never; }>; export interface InsertConfig { with?: WithConfig; into: Table; overriding?: 'SYSTEM' | 'USER'; values: 'DEFAULT' | Query | { [K in keyof this['into']['$']['types']]: this['into']['$']['types'][K]['argument']; }[] | { columns?: string[]; values: any[][]; }; onConflict?: { targets?: { names: (string | string[])[]; where?: Condition; }; constraint?: string; action: 'DO NOTHING' | { set: AnyExpression[] | Record; where?: Condition; }; }; returning?: FieldsConfig | '*'; } export declare const stringifyInsert: (config: InsertConfig) => Template; export declare function stringifyInsertValues(config: Exclude): Template[]; export declare function stringifyOnConflict(config: Exclude): Template; export declare function stringifyConflictTarget(config: Exclude['targets'], undefined>): Template; export {};