// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { DirectoryInsert } from "./DirectoryInsert";
import type { Expression } from "./Expression";
import type { Hint } from "./Hint";
import type { Identifier } from "./Identifier";
import type { OutputClause } from "./OutputClause";
import type { TableRef } from "./TableRef";
import type { With } from "./With";

/**
 * INSERT statement
 */
export type Insert = { table: TableRef, columns: Array<Identifier>, values: Array<Array<Expression>>, query: Expression | null, 
/**
 * INSERT OVERWRITE for Hive/Spark
 */
overwrite: boolean, 
/**
 * PARTITION clause for Hive/Spark
 */
partition: Array<[Identifier, Expression | null]>, 
/**
 * INSERT OVERWRITE DIRECTORY for Hive/Spark
 */
directory: DirectoryInsert | null, 
/**
 * RETURNING clause (PostgreSQL, SQLite)
 */
returning: Array<Expression>, 
/**
 * OUTPUT clause (TSQL)
 */
output: OutputClause | null, 
/**
 * ON CONFLICT clause (PostgreSQL, SQLite)
 */
on_conflict: Expression | null, 
/**
 * Leading comments before the statement
 */
leading_comments: Array<string>, 
/**
 * IF EXISTS clause (Hive)
 */
if_exists: boolean, 
/**
 * WITH clause (CTEs)
 */
with: With | null, 
/**
 * INSERT IGNORE (MySQL) - ignore duplicate key errors
 */
ignore: boolean, 
/**
 * Source alias for VALUES clause (MySQL): VALUES (1, 2) AS new_data
 */
source_alias: Identifier | null, 
/**
 * Table alias (PostgreSQL): INSERT INTO table AS t(...)
 */
alias: Identifier | null, 
/**
 * Whether the alias uses explicit AS keyword
 */
alias_explicit_as: boolean, 
/**
 * DEFAULT VALUES (PostgreSQL): INSERT INTO t DEFAULT VALUES
 */
default_values: boolean, 
/**
 * BY NAME modifier (DuckDB): INSERT INTO x BY NAME SELECT ...
 */
by_name: boolean, 
/**
 * SQLite conflict action: INSERT OR ABORT|FAIL|IGNORE|REPLACE|ROLLBACK INTO ...
 */
conflict_action?: string | null, 
/**
 * MySQL/SQLite REPLACE INTO statement (treat like INSERT)
 */
is_replace: boolean, 
/**
 * Oracle-style hint: INSERT /*+ APPEND */ INTO ...
 */
hint?: Hint | null, 
/**
 * REPLACE WHERE clause (Databricks): INSERT INTO a REPLACE WHERE cond VALUES ...
 */
replace_where: Expression | null, 
/**
 * Source table (Hive/Spark): INSERT OVERWRITE TABLE target TABLE source
 */
source: Expression | null, 
/**
 * ClickHouse: INSERT INTO FUNCTION func_name(...) - the function call
 */
function_target?: Expression | null, 
/**
 * ClickHouse: PARTITION BY expr
 */
partition_by?: Expression | null, 
/**
 * ClickHouse: SETTINGS key = val, ...
 */
settings?: Array<Expression>, };
