Polyglot SQL API Documentation - v0.1.0
    Preparing search index...

    Type Alias Insert

    INSERT statement

    type Insert = {
        alias: Identifier | null;
        alias_explicit_as: boolean;
        by_name: boolean;
        columns: Identifier[];
        conflict_action?: string | null;
        default_values: boolean;
        directory: DirectoryInsert | null;
        function_target?: Expression | null;
        hint?: Hint | null;
        if_exists: boolean;
        ignore: boolean;
        is_replace: boolean;
        leading_comments: string[];
        on_conflict: Expression | null;
        output: OutputClause | null;
        overwrite: boolean;
        partition: [Identifier, Expression | null][];
        partition_by?: Expression | null;
        query: Expression | null;
        replace_where: Expression | null;
        returning: Expression[];
        settings?: Expression[];
        source: Expression | null;
        source_alias: Identifier | null;
        table: TableRef;
        values: Expression[][];
        with: With | null;
    }
    Index

    Properties

    alias: Identifier | null

    Table alias (PostgreSQL): INSERT INTO table AS t(...)

    alias_explicit_as: boolean

    Whether the alias uses explicit AS keyword

    by_name: boolean

    BY NAME modifier (DuckDB): INSERT INTO x BY NAME SELECT ...

    columns: Identifier[]
    conflict_action?: string | null

    SQLite conflict action: INSERT OR ABORT|FAIL|IGNORE|REPLACE|ROLLBACK INTO ...

    default_values: boolean

    DEFAULT VALUES (PostgreSQL): INSERT INTO t DEFAULT VALUES

    directory: DirectoryInsert | null

    INSERT OVERWRITE DIRECTORY for Hive/Spark

    function_target?: Expression | null

    ClickHouse: INSERT INTO FUNCTION func_name(...) - the function call

    hint?: Hint | null

    Oracle-style hint: INSERT /*+ APPEND */ INTO ...

    if_exists: boolean

    IF EXISTS clause (Hive)

    ignore: boolean

    INSERT IGNORE (MySQL) - ignore duplicate key errors

    is_replace: boolean

    MySQL/SQLite REPLACE INTO statement (treat like INSERT)

    leading_comments: string[]

    Leading comments before the statement

    on_conflict: Expression | null

    ON CONFLICT clause (PostgreSQL, SQLite)

    output: OutputClause | null

    OUTPUT clause (TSQL)

    overwrite: boolean

    INSERT OVERWRITE for Hive/Spark

    partition: [Identifier, Expression | null][]

    PARTITION clause for Hive/Spark

    partition_by?: Expression | null

    ClickHouse: PARTITION BY expr

    query: Expression | null
    replace_where: Expression | null

    REPLACE WHERE clause (Databricks): INSERT INTO a REPLACE WHERE cond VALUES ...

    returning: Expression[]

    RETURNING clause (PostgreSQL, SQLite)

    settings?: Expression[]

    ClickHouse: SETTINGS key = val, ...

    source: Expression | null

    Source table (Hive/Spark): INSERT OVERWRITE TABLE target TABLE source

    source_alias: Identifier | null

    Source alias for VALUES clause (MySQL): VALUES (1, 2) AS new_data

    table: TableRef
    values: Expression[][]
    with: With | null

    WITH clause (CTEs)