TableVersion in sqlparser::ast - Rust

pub enum TableVersion {
    ForSystemTimeAsOf(Expr),
    TimestampAsOf(Expr),
    VersionAsOf(Expr),
    Function(Expr),
}
Expand description

Specifies a table version selection, e.g. FOR SYSTEM_TIME AS OF or AT(...).

§

When the table version is defined using FOR SYSTEM_TIME AS OF. For example: SELECT * FROM tbl FOR SYSTEM_TIME AS OF TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)

§

When the table version is defined using TIMESTAMP AS OF. Databricks supports this syntax. For example: SELECT * FROM tbl TIMESTAMP AS OF CURRENT_TIMESTAMP() - INTERVAL 1 HOUR

§

When the table version is defined using VERSION AS OF. Databricks supports this syntax. For example: SELECT * FROM tbl VERSION AS OF 2

§

When the table version is defined using a function. For example: SELECT * FROM tbl AT(TIMESTAMP => '2020-08-14 09:30:00')

§
§
§
§
§
§