import type { PgTable } from '../query/pg-core/index.js'; import type { PgUpdateSetSource } from '../query/pg-core/query-builders/update.js'; import type { DefinedTable } from '../domain/types.js'; import type { WriteState } from './state.js'; type InsertValues = T extends { $inferInsert: infer V; } ? V : Record; export declare class UpsertBuilder implements PromiseLike { private readonly state; constructor(state: WriteState); values(rows: InsertValues | ReadonlyArray>): UpsertBuilder; onConflict(columns: readonly (keyof T['$inferSelect'] & string)[]): UpsertBuilder; set(values: PgUpdateSetSource): UpsertBuilder; returning(): UpsertBuilder[]>; returning>(shape: TShape): UpsertBuilder[]>; then(onfulfilled?: ((value: TResult) => TFulfilled | PromiseLike) | null, onrejected?: ((reason: unknown) => TRejected | PromiseLike) | null): PromiseLike; } /** Starts a pipework-owned upsert against `table`. Chain with `.values(...).onConflict([...]).set(...).returning(...)`. */ export declare function upsert & PgTable>(table: T): UpsertBuilder; export {}; //# sourceMappingURL=upsert.d.ts.map