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

    Type Alias TableRef

    Represent a table reference with optional schema and catalog qualifiers.

    Renders as name, schema.name, or catalog.schema.name depending on which qualifiers are present. Supports aliases, column alias lists, time-travel clauses (Snowflake, BigQuery), table hints (TSQL), and several other dialect-specific extensions.

    type TableRef = {
        alias: Identifier | null;
        alias_explicit_as: boolean;
        catalog: Identifier | null;
        changes?: Changes | null;
        column_aliases: Identifier[];
        final_: boolean;
        hints: Expression[];
        identifier_func?: Expression | null;
        name: Identifier;
        only: boolean;
        partitions?: Identifier[];
        schema: Identifier | null;
        system_time?: string | null;
        table_sample?: Sample | null;
        trailing_comments: string[];
        version?: Version | null;
        when: HistoricalData | null;
    }
    Index

    Properties

    alias: Identifier | null

    Optional table alias (e.g. t in FROM users AS t).

    alias_explicit_as: boolean

    Whether AS keyword was explicitly used for the alias

    catalog: Identifier | null

    Optional catalog qualifier (e.g. mydb in mydb.public.users).

    changes?: Changes | null

    Snowflake CHANGES clause: CHANGES (INFORMATION => ...) AT (...) END (...)

    column_aliases: Identifier[]

    Column aliases for table alias: AS t(c1, c2)

    final_: boolean

    ClickHouse FINAL modifier: forces final aggregation for MergeTree tables

    hints: Expression[]

    TSQL table hints: WITH (TABLOCK, INDEX(myindex), ...)

    identifier_func?: Expression | null

    Snowflake IDENTIFIER() function: dynamic table name from string/variable When set, this is used instead of the name field

    The unqualified table name.

    only: boolean

    PostgreSQL ONLY modifier: prevents scanning child tables in inheritance hierarchy

    partitions?: Identifier[]

    MySQL: PARTITION(p0, p1, ...) hint for reading from specific partitions

    schema: Identifier | null

    Optional schema qualifier (e.g. public in public.users).

    system_time?: string | null

    TSQL: FOR SYSTEM_TIME temporal clause Contains the full clause text, e.g., "FOR SYSTEM_TIME BETWEEN c AND d"

    table_sample?: Sample | null

    TABLESAMPLE clause attached to this table reference (DuckDB, BigQuery)

    trailing_comments: string[]

    Trailing comments that appeared after this table reference

    version?: Version | null

    Time travel version clause: FOR VERSION AS OF / FOR TIMESTAMP AS OF (Presto/Trino, BigQuery, Databricks)

    when: HistoricalData | null

    Snowflake time travel: BEFORE (STATEMENT => ...) or AT (TIMESTAMP => ...)