import { XTables, Table } from '../../rowset'; import { XExpression, Expression, Field } from '../../expression'; import { ColumnsOf, InputObject, RowObject } from '../../types'; import { Scalar } from '../../scalar'; import { Statement, STATEMENT_KIND, STATEMENT_TAG } from '../statement'; import { Select } from './select'; import type { With } from './with'; /** * Insert 语句 */ export declare class Insert extends Statement { $table: Table; $fields?: Field[]; $values?: Expression[][] | Select; $identityInsert: boolean; $with?: With; $tag: STATEMENT_TAG.EXECUTABLE; readonly $kind: STATEMENT_KIND.INSERT; /** * 在插入数据时开启标识列插入,即IdentityInsert On * @returns */ withIdentity(): this; /** * 构造函数 */ constructor(table: XTables, fields?: Field>[] | ColumnsOf[]); /** * 指定插入字段,当使用数组值列表时,必须指定字段名 */ fields(...fields: Field>[] | ColumnsOf[] | [Field>[] | ColumnsOf[]]): void; private _values; values(rows: Select | InputObject | InputObject[] | XExpression[] | XExpression[][]): this; values(...rows: XExpression[][] | InputObject[]): this; static isInsert(object: any): object is Insert; static isRowDataArray: typeof isRowDataArray; } /** * 判断一个数组是否是一个值列表数组,即Scalar[][]; */ declare function isRowDataArray(items: any, /** * 值数量 */ valueLength: number, MAX_SEARCH_SIZE?: number): items is Scalar[][]; export {};