import { DataSet } from '../DataSet'; import { HasFieldValues, HasTable } from './features'; import { Query } from './Query'; import { QueryTable } from './QueryTable'; /** * An INSERT statement. Supports both a single record and a batch of records, * modelled after Eloquent's `DB::table('x')->insert($values)`: * * - Single row: `.setFields({ name: 'Ada' })` (HasFieldValues) * - Batch: `.setRows([{ name: 'Ada' }, { name: 'Bob' }])` * * When `rows` is set it takes precedence and the builder emits a single * multi-row `INSERT INTO t (..) VALUES (..), (..)` statement. The set of * columns is the union of the keys across every row; a row missing a column * inserts NULL for it (Eloquent's behaviour). */ export declare class InsertQuery extends Query { protected _rows?: DataSet[]; constructor(table?: QueryTable); setRows(rows: DataSet[]): this; getRows(): DataSet[] | undefined; } export interface InsertQuery extends HasTable, HasFieldValues { }