import { QueryPromise } from 'drizzle-orm/query-promise'; import { Param, Placeholder, Query, SQL, SQLWrapper } from 'drizzle-orm/sql'; import { PgDialect } from '../dialect'; import { IndexColumn } from '../indexes'; import { SelectFields, SelectFieldsOrdered, SelectResultFields } from '../operations'; import { PgSession, PreparedQuery, PreparedQueryConfig, QueryResultHKT, QueryResultKind } from '../session'; import { AnyPgTable, InferModel } from '../table'; import { PgUpdateSetSource } from './update'; export interface PgInsertConfig { table: TTable; values: Record[]; onConflict?: SQL; returning?: SelectFieldsOrdered; } export declare type PgInsertValue = { [Key in keyof InferModel]: InferModel[Key] | SQL | Placeholder; }; export declare class PgInsertBuilder { private table; private session; private dialect; constructor(table: TTable, session: PgSession, dialect: PgDialect); values(...values: PgInsertValue[]): PgInsert; } export interface PgInsert | undefined = undefined> extends QueryPromise : TReturning[]>, SQLWrapper { } export declare class PgInsert | undefined = undefined> extends QueryPromise : TReturning[]> implements SQLWrapper { private session; private dialect; protected $table: TTable; protected $return: TReturning; private config; constructor(table: TTable, values: PgInsertConfig['values'], session: PgSession, dialect: PgDialect); returning(): Omit>, 'returning' | `onConflict${string}`>; returning(fields: TSelectedFields): Omit>, 'returning' | `onConflict${string}`>; onConflictDoNothing(config?: { target?: IndexColumn | IndexColumn[]; where?: SQL; }): this; onConflictDoUpdate(config: { target: IndexColumn | IndexColumn[]; where?: SQL; set: PgUpdateSetSource; }): this; toSQL(): Query; private _prepare; prepare(name: string): PreparedQuery : TReturning[]; }>; execute: ReturnType['execute']; } //# sourceMappingURL=insert.d.ts.map