bobzhang/sqlglot/core does not have a README file

    ColumnOpFn

    type ColumnOpFn = (Parser, Expr?, Expr?) -> Expr? raise SqlglotError

    COLUMN_OPERATORS / JSON_OPERATORS value: (self, this, rhs) -> Expr.

    FuncBuilder

    type FuncBuilder = (Array[Expr], Parser) -> Expr raise SqlglotError

    A function builder: FUNCTIONS[name](args).

    GenExprFn

    type GenExprFn = (Generator, Expr) -> Expr raise SqlglotError

    GenFn

    type GenFn = (Generator, Expr) -> String raise SqlglotError

    ParseFn

    type ParseFn = (Parser) -> Expr? raise SqlglotError

    ParseFn1

    type ParseFn1 = (Parser, Expr?) -> Expr? raise SqlglotError

    PropKwargs

    type PropKwargs = Map[String, Bool]

    Keyword arguments passed to property parsers (no=True, dual=True, ...).

    PropLocs

    type PropLocs = Map[PropertiesLocation, Array[Expr]]

    Result of locate_properties: properties grouped by their location.

    PropertyFn

    type PropertyFn = (Parser, Map[String, Bool]) -> Value? raise SqlglotError

    A property parser may return an expression, a list of expressions or nothing.

    TokenParseFn

    type TokenParseFn = (Parser, Token) -> Expr? raise SqlglotError

    Transform

    type Transform = (Expr) -> Expr raise SqlglotError

    IntoPy

    pub(open) trait IntoPy {
    fn into_py(Self) -> PyObj
    }

    Conversion of MoonBit values into host values (PyObj).
    impl IntoPy for Bool
    impl IntoPy for Int
    impl IntoPy for Int64
    impl IntoPy for Double
    impl IntoPy for String
    impl IntoPy for Option[T]
    impl IntoPy for Bytes
    impl IntoPy for Array[T]
    impl IntoPy for Map[String, V]

    IntoValue

    pub trait IntoValue {
    fn into_value(Self) -> Value?
    }

    Conversion of host values to expression argument values.
    impl IntoValue for Bool
    impl IntoValue for Int
    impl IntoValue for Int64
    impl IntoValue for String
    impl IntoValue for Option[T]
    impl IntoValue for Array[T]

    SqlArg

    pub trait SqlArg {
    fn arg_sql(Self, Generator) -> String? raise SqlglotError
    }

    An argument of func / format_args: an expression, a SQL string or None.
    impl SqlArg for String
    impl SqlArg for Option[T]

    SqlglotError

    pub(all) suberror SqlglotError {
    TokenError(String, start~ : Int?, end~ : Int?)
    ParseError(String, Array[ParseErrorInfo])
    UnsupportedError(String)
    OptimizeError(String)
    SchemaError(String)
    ExecuteError(String)
    ValueError(String)
    }

    Errors raised by sqlglot.

    SqlglotError::message

    fn SqlglotError::message(self : SqlglotError) -> String

    DType

    pub(all) enum DType {
    ARRAY
    AGGREGATEFUNCTION
    SIMPLEAGGREGATEFUNCTION
    BIGDECIMAL
    BIGINT
    BIGNUM
    BIGSERIAL
    BINARY
    BIT
    BLOB
    BOOLEAN
    BPCHAR
    CHAR
    CHARACTER_SET
    DATE
    DATE32
    DATEMULTIRANGE
    DATERANGE
    DATETIME
    DATETIME2
    DATETIME64
    DECIMAL
    DECIMAL32
    DECIMAL64
    DECIMAL128
    DECIMAL256
    DECFLOAT
    DOUBLE
    DYNAMIC
    ENUM
    ENUM8
    ENUM16
    FILE
    FIXEDSTRING
    FLOAT
    GEOGRAPHY
    GEOGRAPHYPOINT
    GEOMETRY
    POINT
    RING
    LINESTRING
    MULTILINESTRING
    POLYGON
    MULTIPOLYGON
    HLLSKETCH
    HSTORE
    IMAGE
    INET
    INT
    INT128
    INT256
    INT4MULTIRANGE
    INT4RANGE
    INT8MULTIRANGE
    INT8RANGE
    INTERVAL
    IPADDRESS
    IPPREFIX
    IPV4
    IPV6
    JSON
    JSONB
    LIST
    LONGBLOB
    LONGTEXT
    LOWCARDINALITY
    MAP
    MEDIUMBLOB
    MEDIUMINT
    MEDIUMTEXT
    MONEY
    NAME
    NCHAR
    NESTED
    NOTHING
    NULL
    NUMMULTIRANGE
    NUMRANGE
    NVARCHAR
    OBJECT
    RANGE
    ROWVERSION
    SERIAL
    SET
    SMALLDATETIME
    SMALLINT
    SMALLMONEY
    SMALLSERIAL
    STRUCT
    SUPER
    TEXT
    TINYBLOB
    TINYTEXT
    TIME
    TIMETZ
    TIME_NS
    TIMESTAMP
    TIMESTAMPNTZ
    TIMESTAMPLTZ
    TIMESTAMPTZ
    TIMESTAMP_S
    TIMESTAMP_MS
    TIMESTAMP_NS
    TINYINT
    TSMULTIRANGE
    TSRANGE
    TSTZMULTIRANGE
    TSTZRANGE
    UBIGINT
    UINT
    UINT128
    UINT256
    UMEDIUMINT
    UDECIMAL
    UDOUBLE
    UNION
    UNKNOWN
    USERDEFINED
    USMALLINT
    UTINYINT
    UUID
    VARBINARY
    VARCHAR
    VARIANT
    VECTOR
    XML
    YEAR
    TDIGEST
    } derive(Compare, Eq, Hash)

    impl IntoPy for DType
    impl IntoValue for DType
    impl Show for DType

    DType::id

    fn DType::id(self : DType) -> Int

    DType::into_expr

    fn DType::into_expr(self : DType) -> Expr

    Python DType.into_expr().

    DType::name

    fn DType::name(self : DType) -> String

    DType::value

    fn DType::value(self : DType) -> String

    The SQL value of a data type, e.g. DOUBLE PRECISION style names are kept as in Python.

    Dialect

    pub struct Dialect {
    name : String
    cfg : DialectConfig
    tokenizer : TokenizerSettings
    jsonpath_tokenizer : TokenizerSettings
    jsonpath_var_tokens : Array[TokenType]
    parser_cfg : ParserConfig
    parser_fns : ParserFns
    gen_cfg : GeneratorConfig
    gen_fns : GeneratorFns
    hooks : DialectHooks
    normalization_strategy : NormalizationStrategy
    version : (Int, Int, Int)
    settings : Map[String, String]
    supported_settings : Array[String]
    time_trie : Trie
    format_trie : Trie
    inverse_time_trie : Trie
    inverse_format_trie : Trie
    parent : Dialect?
    }

    A SQL dialect: the Python Dialect class plus its Tokenizer, Parser and Generator configuration.
    impl Eq for Dialect
    impl Show for Dialect

    Dialect::base

    fn Dialect::base() -> Dialect

    Builds the base ("sqlglot") dialect.

    Dialect::can_quote

    fn Dialect::can_quote(self : Dialect, identifier : Expr, identify? : String) -> Bool

    Checks if an identifier can be quoted. identify is "always", "safe" or "unsafe".

    Dialect::can_quote_base

    fn Dialect::can_quote_base(self : Dialect, identifier : Expr, identify? : String) -> Bool

    Dialect::case_sensitive

    fn Dialect::case_sensitive(self : Dialect, text : String) -> Bool

    Checks if text contains any case sensitive characters.

    Dialect::finalize

    fn Dialect::finalize(self : Dialect) -> Dialect

    Recomputes derived tables after the configuration has been modified.

    Dialect::format_time

    fn Dialect::format_time(self : Dialect, expression : Expr?) -> Expr?

    Converts a time format in this dialect to a python/strftime time format.

    Dialect::format_time_str

    fn Dialect::format_time_str(self : Dialect, s : String) -> Expr

    Dialect.format_time with a quoted python string (e.g. "'%Y-%m-%d'").

    Dialect::generate_sql

    fn Dialect::generate_sql(self : Dialect, expression : Expr) -> String raise SqlglotError

    Python Dialect.generate(expression) / expression.sql(dialect) with default options.

    Dialect::generate_values_aliases

    fn Dialect::generate_values_aliases(self : Dialect, expression : Expr) -> Array[Expr]

    Dialect::get_or_raise

    fn Dialect::get_or_raise(spec : String) -> Dialect raise SqlglotError

    Look up a dialect in the global registry. The string can be followed by settings, e.g. "mysql, normalization_strategy = case_sensitive".

    Dialect::instance

    fn Dialect::instance(self : Dialect) -> Dialect

    Returns a shallow instance copy (shares class-level configuration) so that instance settings can be changed without affecting the registered dialect. Like Python's Dialect.__init__, the instance's normalization strategy defaults to the class-level NORMALIZATION_STRATEGY (cfg).

    Dialect::normalize_identifier

    fn Dialect::normalize_identifier(self : Dialect, expression : Expr) -> Expr

    Transforms an identifier in a way that resembles how it'd be resolved by this dialect.

    Dialect::normalize_identifier_base

    fn Dialect::normalize_identifier_base(self : Dialect, expression : Expr) -> Expr

    Dialect::parse

    fn Dialect::parse(self : Dialect, sql : String, error_level? : ErrorLevel, error_message_context? : Int, max_errors? : Int, max_nodes? : Int) -> Array[Expr?] raise SqlglotError

    Parses sql into a list of syntax trees, one per statement.

    Dialect::parse_into

    fn Dialect::parse_into(self : Dialect, into : Array[Kind], sql : String, error_level? : ErrorLevel, error_message_context? : Int, max_errors? : Int, max_nodes? : Int, into_is_list? : Bool) -> Array[Expr?] raise SqlglotError

    Parses sql into the given expression type(s).

    Dialect::parser

    fn Dialect::parser(self : Dialect, error_level? : ErrorLevel, error_message_context? : Int, max_errors? : Int, max_nodes? : Int) -> Parser

    Creates a parser for this dialect.

    Dialect::quote_identifier

    fn Dialect::quote_identifier(self : Dialect, expression : Expr, identify? : Bool) -> Expr

    Adds quotes to a given identifier.

    Dialect::subclass

    fn Dialect::subclass(parent : Dialect, name : String, configure : (Dialect) -> Unit) -> Dialect

    Derives a new dialect from parent: copies all of its configuration, then applies configure and recomputes derived tables.

    Dialect::to_json_path

    fn Dialect::to_json_path(self : Dialect, path : Expr?) -> Expr? raise SqlglotError

    Dialect.to_json_path(path): parses string/number literals into JSONPath expressions.

    Dialect::to_json_path_base

    fn Dialect::to_json_path_base(self : Dialect, path : Expr?) -> Expr? raise SqlglotError

    The base Dialect.to_json_path implementation.

    Dialect::tokenize

    fn Dialect::tokenize(self : Dialect, sql : String) -> Array[Token] raise SqlglotError

    Tokenizes sql with this dialect's tokenizer (virtual: see DialectHooks::tokenize).

    Dialect::tokenize_base

    fn Dialect::tokenize_base(self : Dialect, sql : String) -> Array[Token] raise SqlglotError

    Tokenizes sql with this dialect's tokenizer settings.

    DialectConfig

    pub(all) struct DialectConfig {
    alias_post_tablesample : Bool
    alias_post_version : Bool
    alter_table_add_required_for_each_column : Bool
    alter_table_supports_cascade : Bool
    annotate_all_scopes : Bool
    array_agg_includes_nulls : Bool?
    array_funcs_propagates_nulls : Bool
    ascii_only_normalization : Bool
    bit_end : String?
    bit_start : String?
    byte_end : String?
    byte_start : String?
    byte_strings_support_escaped_sequences : Bool
    byte_string_is_bytes_type : Bool
    coalesce_comparison_non_standard : Bool
    concat_coalesce : Bool
    concat_ws_coalesce : Bool
    copy_params_are_csv : Bool
    creatable_kind_mapping : Map[String, String]
    dateint_format : String
    date_format : String
    date_part_mapping : Map[String, String]
    default_functions_column_names : Map[Kind, String]
    default_null_type : DType
    disables_alias_ref_expansion : Bool
    dpipe_is_string_concat : Bool
    escaped_sequences : Map[String, String]
    excludes_pseudocolumns_from_star : Bool
    expand_only_group_alias_ref : Bool
    force_early_alias_ref_expansion : Bool
    format_mapping : Map[String, String]
    has_distinct_array_constructors : Bool
    hex_end : String?
    hex_lowercase : Bool
    hex_start : String?
    hex_string_is_integer_type : Bool
    identifiers_can_start_with_digit : Bool
    identifier_end : String
    identifier_start : String
    index_offset : Int
    initcap_default_delimiter_chars : String
    initcap_supports_custom_delimiters : Bool
    inverse_creatable_kind_mapping : Map[String, String]
    inverse_format_mapping : Map[String, String]
    inverse_time_mapping : Map[String, String]
    inverse_vector_type_aliases : Map[String, String]
    json_extract_scalar_scalar_only : Bool
    json_path_single_dot_is_wildcard : Bool
    least_greatest_ignores_nulls : Bool
    log_base_first : Bool?
    normalization_strategy : NormalizationStrategy
    normalize_functions : StrOrBool
    normalize_not_null : Bool
    null_ordering : String
    numbers_can_be_underscore_separated : Bool
    on_condition_empty_before_error : Bool
    prefer_cte_alias_column : Bool
    preserve_original_names : Bool
    prioritize_non_literal_types : Bool
    projection_aliases_shadow_source_names : Bool
    promote_to_inferred_datetime_type : Bool
    pseudocolumns :
    Set
    [String]
    query_results_are_structs : Bool
    quote_end : String
    quote_start : String
    regexp_extract_default_group : Int
    regexp_extract_position_overflow_returns_null : Bool
    requires_parenthesized_struct_access : Bool
    safe_division : Bool
    safe_to_eliminate_double_negation : Bool
    set_op_distinct_by_default : Map[Kind, Bool?]
    star_ilike_backslash_escape : Bool
    strict_json_path_syntax : Bool
    strict_string_concat : Bool
    strings_support_escaped_sequences : Bool
    supports_alias_refs_in_join_conditions : Bool
    supports_column_join_marks : Bool
    supports_fixed_size_arrays : Bool
    supports_limit_all : Bool
    supports_null_type : Bool
    supports_order_by_all : Bool
    supports_positional_column_refs : Bool
    supports_struct_star_expansion : Bool
    supports_user_defined_types : Bool
    supports_values_default : Bool
    tablesample_size_is_percent : Bool
    tables_referenceable_as_columns : Bool
    time_format : String
    time_mapping : Map[String, String]
    try_cast_requires_string : Bool?
    typed_division : Bool
    unescaped_sequences : Map[String, String]
    unicode_end : String?
    unicode_start : String?
    unnest_column_only : Bool
    uuid_is_string_type : Bool
    valid_interval_units :
    Set
    [String]
    week_offset : Int
    }

    Data attributes of the Python Dialect class.

    DialectConfig::copy

    DialectHooks

    pub(all) struct DialectHooks {
    normalize_identifier : (Dialect, Expr) -> Expr?
    generate_values_aliases : (Dialect, Expr) -> Array[Expr]?
    tokenize : (Dialect, String) -> Array[Token] raise SqlglotError?
    can_quote : (Dialect, Expr, String) -> Bool?
    to_json_path : (Dialect, Expr?) -> Expr? raise SqlglotError?
    extra : Map[String, (Dialect, Expr) -> Expr?]
    }

    Overridable dialect-level methods.

    DialectHooks::copy

    DialectHooks::new

    ErrorLevel

    pub(all) enum ErrorLevel {
    Ignore
    Warn
    Raise
    Immediate
    } derive(Eq, Show)

    Expr

    pub struct Expr {
    kind : Kind
    args : Map[String, Value]
    parent : Expr?
    arg_key : String?
    index : Int?
    comments : Array[String]?
    type_ : Expr?
    meta : Map[String, Value]?
    uid : Int
    // private fields
    }

    A node of the SQL syntax tree.
    impl IntoPy for Expr
    impl IntoValue for Expr
    impl SqlArg for Expr
    impl Eq for Expr
    impl Hash for Expr

    Expr::add

    fn[T : IntoPy] Expr::add(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr + other (Expr.__add__).

    Expr::add_comments

    fn Expr::add_comments(self : Expr, comments : Array[String]?, prepend? : Bool) -> Unit

    Expr::alias

    fn Expr::alias(self : Expr) -> String

    The alias of the expression, or an empty string if it's not aliased.

    Expr::alias_column_names

    fn Expr::alias_column_names(self : Expr) -> Array[String]

    Expr::alias_or_name

    fn Expr::alias_or_name(self : Expr) -> String

    Expr::and_

    fn[T : IntoPy] Expr::and_(self : Expr, expressions : Array[T], dialect? : Dialect, copy? : Bool, wrap? : Bool) -> Expr raise SqlglotError

    Expr.and_(*expressions)

    Expr::append

    fn Expr::append(self : Expr, arg_key : String, value : &IntoValue) -> Unit

    Appends value to arg_key if it's a list or sets it as a new list.

    Expr::apply

    fn Expr::apply(self : Expr, func : (Expr) -> Unit raise?) -> Expr raise?

    Expr.apply(func): applies func to this expression for side effects and returns it.

    Expr::arg

    fn Expr::arg(self : Expr, key : String) -> Expr?

    Returns the argument key if it is an expression.

    Expr::arg_keys

    fn Expr::arg_keys(self : Expr) -> Array[String]

    Python list(e.args): the argument keys, including those set to an explicit None (which come last here).

    Expr::as_

    fn Expr::as_(self : Expr, alias : String, quoted? : Bool, copy? : Bool, table? : Array[String]) -> Expr

    expr.as_(alias)

    Expr::asc

    fn Expr::asc(self : Expr, nulls_first? : Bool) -> Expr

    Expr.asc(nulls_first=True)

    Expr::assert_is

    fn Expr::assert_is(self : Expr, kind : Kind) -> Expr raise SqlglotError

    Expr.assert_is(type_): raises if this expression isn't of kind kind.

    Expr::between

    fn[L : IntoPy, H : IntoPy] Expr::between(self : Expr, low : L, high : H, copy? : Bool, symmetric? : Bool) -> Expr raise SqlglotError

    Expr.between(low, high, symmetric=...)

    Expr::bfs

    fn Expr::bfs(self : Expr, prune? : (Expr) -> Bool) -> Iter[Expr]

    Iterates the tree in BFS order.

    Expr::binop

    fn[T : IntoPy] Expr::binop(self : Expr, kind : Kind, other : T, reverse? : Bool) -> Expr raise SqlglotError

    Python Expr._binop(klass, other, reverse).

    Expr::bool_arg

    fn Expr::bool_arg(self : Expr, key : String) -> Bool

    Returns the boolean argument key (Python truthiness).

    Expr::canonical

    fn Expr::canonical(self : Expr) -> String

    Canonical dump: Kind(k=v,...) with keys in arg_types order.

    Expr::catalog

    fn Expr::catalog(self : Expr) -> String

    Expr::cluster_by

    fn[T : IntoPy] Expr::cluster_by(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.cluster_by(*expressions)

    Expr::column_parts

    fn Expr::column_parts(self : Expr) -> Array[Expr]

    The parts of a column in order catalog, db, table, name.

    Expr::copy

    fn Expr::copy(self : Expr) -> Expr

    Returns a deep copy of the expression. Like Python's Expr.__deepcopy__, the tree is copied iteratively so that very deep trees don't exhaust the stack.

    Expr::ctas

    fn[T : IntoPy] Expr::ctas(self : Expr, table : T, properties? : Map[String, PyObj], dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.ctas(table, properties=...): converts this query to a CREATE TABLE AS statement.

    Expr::ctes

    fn Expr::ctes(self : Expr) -> Array[Expr]

    Query.ctes

    Expr::datatype_this

    fn Expr::datatype_this(self : Expr) -> DType?

    The DType stored in a DataType's this, if it's a plain type.

    Expr::db

    fn Expr::db(self : Expr) -> String

    Expr::delete

    fn[T : IntoPy] Expr::delete(self : Expr, table : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Delete.delete(table): sets the table to delete from.

    Expr::depth

    fn Expr::depth(self : Expr) -> Int

    Depth of this node in the tree.

    Expr::desc

    fn Expr::desc(self : Expr, nulls_first? : Bool) -> Expr

    Expr.desc(nulls_first=False)

    Expr::dfs

    fn Expr::dfs(self : Expr, prune? : (Expr) -> Bool) -> Iter[Expr]

    Iterates the tree in DFS order.

    Expr::distinct_

    fn Expr::distinct_(self : Expr, ons? : Array[&IntoPy], distinct? : Bool, copy? : Bool) -> Expr raise SqlglotError

    Select.distinct(*ons, distinct=True)

    Expr::div

    fn[T : IntoPy] Expr::div(self : Expr, other : T, typed? : Bool, safe? : Bool) -> Expr raise SqlglotError

    Expr.div(other, typed=..., safe=...)

    Expr::dump

    fn Expr::dump(self : Expr) -> Json

    Dumps this expression into a JSON-serializable list of payloads (Python Expr.dump).

    Expr::else_

    fn[T : IntoPy] Expr::else_(self : Expr, default : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Case.else_(condition)

    Expr::eq_

    fn[T : IntoPy] Expr::eq_(self : Expr, other : T) -> Expr raise SqlglotError

    expr.eq(other)

    Expr::error_messages

    fn Expr::error_messages(self : Expr, nargs? : Int) -> Array[String]

    Checks the arguments of an expression for errors.

    Expr::except_

    fn[T : IntoPy] Expr::except_(self : Expr, other : T, distinct? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.except_(*expressions, distinct=...)

    Expr::expression

    fn Expr::expression(self : Expr) -> Expr?

    self.expression when it is an expression.

    Expr::expression_

    fn Expr::expression_(self : Expr) -> Expr

    Expr::expressions

    fn Expr::expressions(self : Expr) -> Array[Expr]

    self.expressions.

    Expr::find

    fn Expr::find(self : Expr, kinds : ArrayView[Kind], bfs? : Bool) -> Expr?

    Returns the first node in this tree which matches at least one of the kinds.

    Expr::find_all

    fn Expr::find_all(self : Expr, kinds : ArrayView[Kind], bfs? : Bool) -> Iter[Expr]

    Returns all nodes in this tree which match at least one of the kinds.

    Expr::find_ancestor

    fn Expr::find_ancestor(self : Expr, kinds : ArrayView[Kind]) -> Expr?

    Returns the nearest parent matching the kinds.

    Expr::flatten

    fn Expr::flatten(self : Expr, unnest? : Bool) -> Iter[Expr]

    Returns a generator which yields child nodes whose parents are the same class.

    Expr::floordiv

    fn[T : IntoPy] Expr::floordiv(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr // other (Expr.__floordiv__).

    Expr::from_

    fn[T : IntoPy] Expr::from_(self : Expr, expression : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.from_(expression) / Update.from_(expression)

    Expr::ge

    fn[T : IntoPy] Expr::ge(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr >= other (Expr.__ge__).

    Expr::get

    fn Expr::get(self : Expr, key : String) -> Value?

    Expr::get_meta

    fn Expr::get_meta(self : Expr) -> Map[String, Value]

    Expr::get_type

    fn Expr::get_type(self : Expr) -> Expr?

    The type property: the inferred data type of this expression.

    Expr::getitem

    fn Expr::getitem(self : Expr, keys : Array[&IntoPy]) -> Expr raise SqlglotError

    Python expr[other] (Expr.__getitem__); several keys build a multi-index bracket.

    Expr::group_by

    fn[T : IntoPy] Expr::group_by(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.group_by(*expressions)

    Expr::gt

    fn[T : IntoPy] Expr::gt(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr > other (Expr.__gt__).

    Expr::has

    fn Expr::has(self : Expr, key : String) -> Bool

    Python truthiness of self.args.get(key).

    Expr::has_key

    fn Expr::has_key(self : Expr, key : String) -> Bool

    Python key in e.args: whether the argument is set, including to an explicit None (see Expr::none_keys). Use has for Python's truthiness of e.args.get(key).

    Expr::having_

    fn[T : IntoPy] Expr::having_(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.having(*expressions)

    Expr::hint

    fn[T : IntoPy] Expr::hint(self : Expr, hints : Array[T], dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.hint(*hints)

    Expr::ilike

    fn[T : IntoPy] Expr::ilike(self : Expr, other : T) -> Expr raise SqlglotError

    Expr.ilike(other)

    Expr::intersect_

    fn[T : IntoPy] Expr::intersect_(self : Expr, other : T, distinct? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.intersect(*expressions, distinct=...)

    Expr::invert

    fn Expr::invert(self : Expr) -> Expr raise SqlglotError

    Python ~expr (Expr.__invert__).

    Expr::is__

    fn[T : IntoPy] Expr::is__(self : Expr, other : T) -> Expr raise SqlglotError

    expr.is_(other)

    Expr::is_int

    fn Expr::is_int(self : Expr) -> Bool

    Expr::is_leaf

    fn Expr::is_leaf(self : Expr) -> Bool

    Expr::is_number

    fn Expr::is_number(self : Expr) -> Bool

    Expr::is_star

    fn Expr::is_star(self : Expr) -> Bool

    Expr::is_string

    fn Expr::is_string(self : Expr) -> Bool

    Expr::is_type

    fn Expr::is_type(self : Expr, dtypes : ArrayView[DType]) -> Bool

    Python Expr.is_type(*dtypes).

    Expr::is_type_expr

    fn Expr::is_type_expr(self : Expr, other : Expr) -> Bool

    Python Expr.is_type(data_type_expr).

    Expr::is_wrapper

    fn Expr::is_wrapper(self : Expr) -> Bool

    Whether this Subquery acts as a simple wrapper around another expression.

    Expr::isin

    fn Expr::isin(self : Expr, expressions? : Array[&IntoPy], query? : &IntoPy, unnest? : Array[&IntoPy], dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Expr.isin(*expressions, query=..., unnest=...)

    Expr::iter_expressions

    fn Expr::iter_expressions(self : Expr, reverse? : Bool) -> Array[Expr]

    Yields all child expressions, exploding list args.

    Expr::join_

    fn[T : IntoPy] Expr::join_(self : Expr, expression : T, on? : Array[&IntoPy], using_? : Array[&IntoPy], append? : Bool, join_type? : String, join_alias? : String, side? : String, kind? : String, method? : String, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.join(expression, on=..., using=..., join_type=..., join_alias=...).

    side, kind and method directly set the corresponding join arguments.

    Expr::land

    fn[T : IntoPy] Expr::land(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr & other (Expr.__and__).

    Expr::lateral

    fn[T : IntoPy] Expr::lateral(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.lateral(*expressions)

    Expr::le

    fn[T : IntoPy] Expr::le(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr <= other (Expr.__le__).

    Expr::like

    fn[T : IntoPy] Expr::like(self : Expr, other : T) -> Expr raise SqlglotError

    Expr.like(other)

    Expr::limit_

    fn[T : IntoPy] Expr::limit_(self : Expr, expression : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.limit(expression)

    Expr::list

    fn Expr::list(self : Expr, key : String) -> Array[Expr]

    Returns the list argument key (only expression elements).

    Expr::load

    fn Expr::load(payloads : Json) -> Expr? raise SqlglotError

    Loads a payload list produced by Expr::dump back into an expression (Python Expr.load). Returns None for an empty or null payload list.

    Expr::lock

    fn Expr::lock(self : Expr, update? : Bool, copy? : Bool) -> Expr

    Select.lock(update=True)

    Expr::lor

    fn[T : IntoPy] Expr::lor(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr | other (Expr.__or__).

    Expr::lt

    fn[T : IntoPy] Expr::lt(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr < other (Expr.__lt__).

    Expr::meta_bool

    fn Expr::meta_bool(self : Expr, key : String) -> Bool

    Expr::meta_get

    fn Expr::meta_get(self : Expr, key : String) -> Value?

    Expr::mod

    fn[T : IntoPy] Expr::mod(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr % other (Expr.__mod__).

    Expr::mul

    fn[T : IntoPy] Expr::mul(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr * other (Expr.__mul__).

    Expr::name

    fn Expr::name(self : Expr) -> String

    Expr::named_selects

    fn Expr::named_selects(self : Expr) -> Array[String]

    Selectable.named_selects: output names of the projections.

    Expr::neg

    fn Expr::neg(self : Expr) -> Expr

    Python -expr (Expr.__neg__).

    Expr::neq

    fn[T : IntoPy] Expr::neq(self : Expr, other : T) -> Expr raise SqlglotError

    Expr.neq(other)

    Expr::new

    fn Expr::new(kind : Kind, args : Map[String, Value]) -> Expr

    Creates a new expression of kind with the given arguments. None arguments are skipped.

    Expr::not_

    fn Expr::not_(self : Expr, copy? : Bool) -> Expr raise SqlglotError

    Expr.not_()

    Expr::offset_

    fn[T : IntoPy] Expr::offset_(self : Expr, expression : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.offset(expression)

    Expr::on

    fn[T : IntoPy] Expr::on(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Join.on(*expressions)

    Expr::or_

    fn[T : IntoPy] Expr::or_(self : Expr, expressions : Array[T], dialect? : Dialect, copy? : Bool, wrap? : Bool) -> Expr raise SqlglotError

    Expr.or_(*expressions)

    Expr::order_by

    fn[T : IntoPy] Expr::order_by(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.order_by(*expressions)

    Expr::output_name

    fn Expr::output_name(self : Expr) -> String

    Name of the output column if this expression is a selection.

    Expr::parent_select

    fn Expr::parent_select(self : Expr) -> Expr?

    Expr::parts

    fn Expr::parts(self : Expr) -> Array[Expr]

    Table.parts / Dot.parts / Column.parts.

    Expr::pipe

    fn[R] Expr::pipe(self : Expr, func : (Expr) -> R raise?) -> R raise?

    Expr.pipe(func): applies func to this expression and returns the result.

    Expr::pop

    fn Expr::pop(self : Expr) -> Expr

    Removes this expression from its parent.

    Expr::pop_comments

    fn Expr::pop_comments(self : Expr) -> Array[String]

    Expr::pow

    fn[T : IntoPy] Expr::pow(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr ** other (Expr.__pow__).

    Expr::qualify

    fn[T : IntoPy] Expr::qualify(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.qualify(*expressions)

    Expr::raw_list

    fn Expr::raw_list(self : Expr, key : String) -> Array[Value]

    Returns the raw list argument key.

    Expr::replace

    fn Expr::replace(self : Expr, expression : Expr?) -> Expr?

    Replaces this node with expression in its parent. Returns the new expression.

    Expr::replace_with_list

    fn Expr::replace_with_list(self : Expr, expressions : Array[Expr]) -> Unit

    Replace with a list of expressions (Python replace([...])).

    Expr::returning

    fn[T : IntoPy] Expr::returning(self : Expr, expression : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    DML.returning(expression)

    Expr::rlike

    fn[T : IntoPy] Expr::rlike(self : Expr, other : T) -> Expr raise SqlglotError

    Expr.rlike(other)

    Expr::root

    fn Expr::root(self : Expr) -> Expr

    Expr::same_parent

    fn Expr::same_parent(self : Expr) -> Bool

    Expr::select_

    fn[T : IntoPy] Expr::select_(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.select(*expressions, append=...) (also SetOperation.select and Subquery.select).

    Expr::selects

    fn Expr::selects(self : Expr) -> Array[Expr]

    Selectable.selects: the projections of a query-like expression.

    Expr::set

    fn Expr::set(self : Expr, arg_key : String, value : &IntoValue) -> Unit

    Sets arg_key to value. None removes the argument.

    Expr::set_

    fn[T : IntoPy] Expr::set_(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Update.set_(*expressions)

    Expr::set_at

    fn Expr::set_at(self : Expr, arg_key : String, value : &IntoValue, index : Int, overwrite? : Bool) -> Unit

    Expr.set(arg_key, value, index, overwrite) for list arguments.

    Expr::set_kwargs

    fn Expr::set_kwargs(self : Expr, kwargs : ArrayView[(String, &IntoValue)]) -> Expr

    Expr::set_parent_ref

    fn Expr::set_parent_ref(self : Expr, parent : Expr?) -> Unit

    Sets the parent pointer without attaching the node to parent's args (Python node.parent = parent).

    Expr::set_type

    fn Expr::set_type(self : Expr, dtype : Expr?) -> Unit

    Sets the inferred data type of this expression.

    Expr::sort_by

    fn[T : IntoPy] Expr::sort_by(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.sort_by(*expressions)

    Expr::str_arg

    fn Expr::str_arg(self : Expr, key : String) -> String?

    Returns the string argument key, if it is a string.

    Expr::sub

    fn[T : IntoPy] Expr::sub(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr - other (Expr.__sub__).

    Expr::subquery

    fn Expr::subquery(self : Expr, alias? : String, copy? : Bool) -> Expr

    Query.subquery(alias, copy)

    Expr::table

    fn[T : IntoPy] Expr::table(self : Expr, expression : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Update.table(expression): sets the table to update.

    Expr::table_name

    fn Expr::table_name(self : Expr) -> String

    Expr::text

    fn Expr::text(self : Expr, key : String) -> String

    Returns a textual representation of the argument corresponding to key.

    Expr::this

    fn Expr::this(self : Expr) -> Expr?

    self.this when it is an expression.

    Expr::this_

    fn Expr::this_(self : Expr) -> Expr

    self.this expression; panics if missing.

    Expr::to_column

    fn Expr::to_column(self : Expr, copy? : Bool) -> Expr

    Table.to_column()

    Expr::to_dot

    fn Expr::to_dot(self : Expr, include_dots? : Bool) -> Expr

    Column.to_dot(): converts the column into a dot expression.

    Expr::to_py

    fn Expr::to_py(self : Expr) -> PyObj raise SqlglotError

    Python Expr.to_py(): returns a host value equivalent of the SQL node. Raises ValueError for nodes that can't be converted.

    Expr::to_py_float

    fn Expr::to_py_float(self : Expr) -> Double?

    Converts a number literal to a Double.

    Expr::to_py_int

    fn Expr::to_py_int(self : Expr) -> Int64?

    Converts a number literal to a host value: Int64 when integral.

    Expr::to_s

    fn Expr::to_s(self : Expr) -> String

    Python Expr.__repr__ (_to_s): a textual representation of the expression tree.

    Expr::transform

    fn Expr::transform(self : Expr, fun : (Expr) -> Expr? raise?, copy? : Bool) -> Expr raise?

    Recursively visits all tree nodes (DFS) and applies fun to each, replacing nodes.

    Expr::transform_values

    fn Expr::transform_values(self : Expr, fun : (Expr) -> Value? raise?, copy? : Bool) -> Value raise?

    Python Expr.transform(fun) where fun may return a node, a list of nodes or None (Python's transform accepts any of these as replacement values).

    Expr::truediv

    fn[T : IntoPy] Expr::truediv(self : Expr, other : T) -> Expr raise SqlglotError

    Python expr / other (Expr.__truediv__).

    Expr::unalias

    fn Expr::unalias(self : Expr) -> Expr

    Expr::union_

    fn[T : IntoPy] Expr::union_(self : Expr, other : T, distinct? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.union(*expressions, distinct=...)

    Expr::unnest

    fn Expr::unnest(self : Expr) -> Expr

    Returns the first non-parenthesis child (or first non-subquery for subqueries).

    Expr::unnest_operands

    fn Expr::unnest_operands(self : Expr) -> Array[Expr]

    Expr::unwrap_subquery

    fn Expr::unwrap_subquery(self : Expr) -> Expr

    Subquery.unwrap

    Expr::update_positions

    fn Expr::update_positions(self : Expr, other : Expr?) -> Expr

    Expr::update_positions_from_token

    fn Expr::update_positions_from_token(self : Expr, token : Token) -> Expr

    Updates position meta from a token.

    Expr::using_

    fn[T : IntoPy] Expr::using_(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Join.using(*expressions)

    Expr::walk

    fn Expr::walk(self : Expr, bfs? : Bool, prune? : (Expr) -> Bool) -> Iter[Expr]

    Expr::when_

    fn[C : IntoPy, T : IntoPy] Expr::when_(self : Expr, condition : C, then : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Case.when(condition, then)

    Expr::where_

    fn[T : IntoPy] Expr::where_(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Query.where(*expressions) (also Delete.where / Update.where)

    Expr::window

    fn[T : IntoPy] Expr::window(self : Expr, expressions : Array[T], append? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Select.window(*expressions)

    Expr::with_

    fn[A : IntoPy, B : IntoPy] Expr::with_(self : Expr, alias : A, as_ : B, recursive? : Bool, materialized? : Bool, append? : Bool, dialect? : Dialect, copy? : Bool, scalar? : Bool) -> Expr raise SqlglotError

    Query.with_(alias, as_, recursive=...) (also Insert.with_ / Update.with_)

    Generator

    pub(all) struct Generator {
    dialect : Dialect
    cfg : GeneratorConfig
    fns : GeneratorFns
    pretty : Bool
    identify : String
    normalize : Bool
    pad : Int
    indent_size : Int
    normalize_functions : String
    unsupported_level : ErrorLevel
    max_unsupported : Int
    leading_comma : Bool
    max_text_width : Int
    comments : Bool
    unsupported_messages : Array[String]
    escaped_quote_end : String
    escaped_byte_quote_end : String
    escaped_identifier_end : String
    next_name : () -> String
    identifier_start : String
    identifier_end : String
    quote_json_path_key_using_brackets : Bool
    }

    Converts a given syntax tree to the corresponding SQL string.

    Generator::add_arrayagg_null_filter

    fn Generator::add_arrayagg_null_filter(self : Generator, array_agg_sql : String, array_agg_expr : Expr, column_expr : Expr?) -> String raise SqlglotError

    Python _add_arrayagg_null_filter.

    Generator::add_column_sql

    fn Generator::add_column_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Virtual add_column_sql.

    Generator::add_column_sql_base

    fn Generator::add_column_sql_base(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::add_sql

    fn Generator::add_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::addconstraint_sql

    fn Generator::addconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::addpartition_sql

    fn Generator::addpartition_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::after_limit_modifiers

    fn Generator::after_limit_modifiers(self : Generator, expression : Expr) -> Array[String] raise SqlglotError

    Virtual after_limit_modifiers.

    Generator::after_limit_modifiers_base

    fn Generator::after_limit_modifiers_base(self : Generator, expression : Expr) -> Array[String] raise SqlglotError

    Generator::aiforecast_sql

    fn Generator::aiforecast_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::alias_sql

    fn Generator::alias_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::aliases_sql

    fn Generator::aliases_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::all_sql

    fn Generator::all_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::alter_column_null_constraint_sql

    fn Generator::alter_column_null_constraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Python _alter_column_null_constraint_sql.

    Generator::alter_sql

    fn Generator::alter_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::altercolumn_sql

    fn Generator::altercolumn_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::alterdiststyle_sql

    fn Generator::alterdiststyle_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::alterindex_sql

    fn Generator::alterindex_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::altermodifysqlsecurity_sql

    fn Generator::altermodifysqlsecurity_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::alterrename_sql

    fn Generator::alterrename_sql(self : Generator, expression : Expr, include_to? : Bool) -> String raise SqlglotError

    Generator::alterrename_sql_v

    fn Generator::alterrename_sql_v(self : Generator, expression : Expr, include_to? : Bool) -> String raise SqlglotError

    Virtual alterrename_sql(expression, include_to).

    Generator::altersession_sql

    fn Generator::altersession_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::alterset_sql

    fn Generator::alterset_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::altersortkey_sql

    fn Generator::altersortkey_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyze_sql

    fn Generator::analyze_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyzedelete_sql

    fn Generator::analyzedelete_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyzehistogram_sql

    fn Generator::analyzehistogram_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyzelistchainedrows_sql

    fn Generator::analyzelistchainedrows_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyzesample_sql

    fn Generator::analyzesample_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyzestatistics_sql

    fn Generator::analyzestatistics_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::analyzevalidate_sql

    fn Generator::analyzevalidate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::and_sql

    fn Generator::and_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::anonymous_sql

    fn Generator::anonymous_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::anonymousaggfunc_sql

    fn Generator::anonymousaggfunc_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::any_sql

    fn Generator::any_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::anyvalue_sql

    fn Generator::anyvalue_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::apply_sql

    fn Generator::apply_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::arrayagg_sql

    fn Generator::arrayagg_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::arrayany_sql

    fn Generator::arrayany_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::arrayinsert_sql

    fn Generator::arrayinsert_sql(self : Generator, expression : Expr, index_offset? : Int) -> String raise SqlglotError

    Generator::arrayinsert_sql_v

    fn Generator::arrayinsert_sql_v(self : Generator, expression : Expr, index_offset? : Int) -> String raise SqlglotError

    Virtual arrayinsert_sql(expression, index_offset).

    Generator::arraysize_sql

    fn Generator::arraysize_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::atindex_sql

    fn Generator::atindex_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::attach_sql

    fn Generator::attach_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::attachoption_sql

    fn Generator::attachoption_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::attimezone_sql

    fn Generator::attimezone_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::autoincrementcolumnconstraint_sql

    fn Generator::autoincrementcolumnconstraint_sql(self : Generator, expression : Expr) -> String

    Generator::base_dispatch

    fn Generator::base_dispatch(self : Generator, kind : Kind, e : Expr) -> String? raise SqlglotError

    The base Generator's <key>_sql method for kind, if any (Python _build_dispatch minus TRANSFORMS).

    Generator::between_sql

    fn Generator::between_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::binary

    fn Generator::binary(self : Generator, expression : Expr, op : String) -> String raise SqlglotError

    Generator::bitstring_sql

    fn Generator::bitstring_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bitwiseand_sql

    fn Generator::bitwiseand_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bitwiseleftshift_sql

    fn Generator::bitwiseleftshift_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bitwisenot_sql

    fn Generator::bitwisenot_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bitwiseor_sql

    fn Generator::bitwiseor_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bitwiserightshift_sql

    fn Generator::bitwiserightshift_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bitwisexor_sql

    fn Generator::bitwisexor_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::block_sql

    fn Generator::block_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::blockcompressionproperty_sql

    fn Generator::blockcompressionproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::booland_sql

    fn Generator::booland_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::boolean_sql

    fn Generator::boolean_sql(self : Generator, expression : Expr) -> String

    Generator::boolor_sql

    fn Generator::boolor_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bracket_offset_expressions

    fn Generator::bracket_offset_expressions(self : Generator, expression : Expr, index_offset? : Int) -> Array[Expr] raise SqlglotError

    Generator::bracket_sql

    fn Generator::bracket_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::buildproperty_sql

    fn Generator::buildproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::bytestring_sql

    fn Generator::bytestring_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::cache_sql

    fn Generator::cache_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::call_method

    fn Generator::call_method(self : Generator, kind : Kind, expression : Expr) -> String raise SqlglotError

    Virtual call of a <key>_sql method: a dialect override if present, else the base implementation (Python self.<key>_sql(expression)).

    Generator::case_sql

    fn Generator::case_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::casestatement_sql

    fn Generator::casestatement_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::cast_sql

    fn Generator::cast_sql(self : Generator, expression : Expr, safe_prefix? : String) -> String raise SqlglotError

    Generator::cast_sql_v

    fn Generator::cast_sql_v(self : Generator, expression : Expr, safe_prefix? : String) -> String raise SqlglotError

    Virtual cast_sql(expression, safe_prefix).

    Generator::ceil_floor

    fn Generator::ceil_floor(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::changes_sql

    fn Generator::changes_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::characterset_sql

    fn Generator::characterset_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::check_sql

    fn Generator::check_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::checkcolumnconstraint_sql

    fn Generator::checkcolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::checksumproperty_sql

    fn Generator::checksumproperty_sql(self : Generator, expression : Expr) -> String

    Generator::chr_sql

    fn Generator::chr_sql(self : Generator, expression : Expr, name? : String) -> String raise SqlglotError

    Generator::chr_sql_v

    fn Generator::chr_sql_v(self : Generator, expression : Expr, name? : String) -> String raise SqlglotError

    Virtual chr_sql(expression, name).

    Generator::clone_sql

    fn Generator::clone_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::cluster_sql

    fn Generator::cluster_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::clusteredbyproperty_sql

    fn Generator::clusteredbyproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::clusterproperty_sql

    fn Generator::clusterproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::collate_sql

    fn Generator::collate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::column_parts

    fn Generator::column_parts(self : Generator, expression : Expr) -> String raise SqlglotError

    Virtual column_parts.

    Generator::column_parts_base

    fn Generator::column_parts_base(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::column_sql

    fn Generator::column_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::columnconstraint_sql

    fn Generator::columnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::columndef_sql

    fn Generator::columndef_sql(self : Generator, expression : Expr, sep? : String) -> String raise SqlglotError

    Generator::columndef_sql_v

    fn Generator::columndef_sql_v(self : Generator, expression : Expr, sep? : String) -> String raise SqlglotError

    Virtual columndef_sql(expression, sep).

    Generator::columnposition_sql

    fn Generator::columnposition_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::columnprefix_sql

    fn Generator::columnprefix_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::columns_sql

    fn Generator::columns_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::combinedaggfunc_sql

    fn Generator::combinedaggfunc_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::combinedparameterizedagg_sql

    fn Generator::combinedparameterizedagg_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::command_sql

    fn Generator::command_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::comment_sql

    fn Generator::comment_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::commit_sql

    fn Generator::commit_sql(self : Generator, expression : Expr) -> String

    Generator::comprehension_sql

    fn Generator::comprehension_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::compresscolumnconstraint_sql

    fn Generator::compresscolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::computedcolumnconstraint_sql

    fn Generator::computedcolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::concat_sql

    fn Generator::concat_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::concat_to_dpipe_sql

    fn Generator::concat_to_dpipe_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Python dialects.dialect.concat_to_dpipe_sql.

    Generator::concatws_sql

    fn Generator::concatws_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::conditionalinsert_sql

    fn Generator::conditionalinsert_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::connect_sql

    fn Generator::connect_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::connector_sql

    fn Generator::connector_sql(self : Generator, expression : Expr, op : String) -> String raise SqlglotError

    Generator::constraint_sql

    fn Generator::constraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::convert_concat_args

    fn Generator::convert_concat_args(self : Generator, expression : Expr) -> Array[Expr] raise SqlglotError

    Generator::convert_sql

    fn Generator::convert_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::converttimezone_sql

    fn Generator::converttimezone_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::copy_sql

    fn Generator::copy_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::copyparameter_sql

    fn Generator::copyparameter_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::create_sql

    fn Generator::create_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::createable_sql

    fn Generator::createable_sql(self : Generator, expression : Expr, locations : Map[PropertiesLocation, Array[Expr]]) -> String raise SqlglotError

    Virtual createable_sql.

    Generator::createable_sql_base

    fn Generator::createable_sql_base(self : Generator, expression : Expr, locations : Map[PropertiesLocation, Array[Expr]]) -> String raise SqlglotError

    Generator::credentials_sql

    fn Generator::credentials_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::cte_sql

    fn Generator::cte_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::cube_sql

    fn Generator::cube_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::currentdate_sql

    fn Generator::currentdate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::datablocksizeproperty_sql

    fn Generator::datablocksizeproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::datadeletionproperty_sql

    fn Generator::datadeletionproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::datatype_param_bound_limiter

    fn Generator::datatype_param_bound_limiter(self : Generator, expression : Expr, type_value : DType, defaults : Array[Int], bounds : Array[Int?]) -> Expr raise SqlglotError

    Generator::datatype_sql

    fn Generator::datatype_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::datatypeparam_sql

    fn Generator::datatypeparam_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dateadd_sql

    fn Generator::dateadd_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::datefromunixdate_sql

    fn Generator::datefromunixdate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::declare_sql

    fn Generator::declare_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::declareitem_sql

    fn Generator::declareitem_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::decodecase_sql

    fn Generator::decodecase_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::delete_sql

    fn Generator::delete_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::describe_sql

    fn Generator::describe_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::detach_sql

    fn Generator::detach_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dialect_class_name

    fn Generator::dialect_class_name(self : Generator) -> String

    The dialect's class name, used in some messages (Python self.dialect.__class__.__name__).

    Generator::dictproperty_sql

    fn Generator::dictproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dictrange_sql

    fn Generator::dictrange_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dictsubproperty_sql

    fn Generator::dictsubproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::directory_sql

    fn Generator::directory_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::directorystage_sql

    fn Generator::directorystage_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::distance_sql

    fn Generator::distance_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::distancend_sql

    fn Generator::distancend_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::distinct_sql

    fn Generator::distinct_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::distribute_sql

    fn Generator::distribute_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::distributedbyproperty_sql

    fn Generator::distributedbyproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::div_sql

    fn Generator::div_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dot_sql

    fn Generator::dot_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dpipe_sql

    fn Generator::dpipe_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::drop_sql

    fn Generator::drop_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::droppartition_sql

    fn Generator::droppartition_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dropprimarykey_sql

    fn Generator::dropprimarykey_sql(self : Generator, expression : Expr) -> String

    Generator::duplicatekeyproperty_sql

    fn Generator::duplicatekeyproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::dynamicidentifier_sql

    fn Generator::dynamicidentifier_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::embed_ignore_nulls

    fn Generator::embed_ignore_nulls(self : Generator, expression : Expr, text : String) -> String raise SqlglotError

    Python _embed_ignore_nulls.

    Generator::encodeproperty_sql

    fn Generator::encodeproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::eq_sql

    fn Generator::eq_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::escape_sql

    fn Generator::escape_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::escape_str

    fn Generator::escape_str(self : Generator, text : String, escape_backslash? : Bool, delimiter? : String, escaped_delimiter? : String, is_byte_string? : Bool) -> String

    Generator::execute_sql

    fn Generator::execute_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::executesql_sql

    fn Generator::executesql_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::exists_sql

    fn Generator::exists_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::explodinggenerateseries_sql

    fn Generator::explodinggenerateseries_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::export_sql

    fn Generator::export_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::expressions

    fn Generator::expressions(self : Generator, expression? : Expr, key? : String, sqls? : Array[Value], flat? : Bool, indent? : Bool, skip_first? : Bool, skip_last? : Bool, sep? : String, prefix? : String, dynamic? : Bool, new_line? : Bool) -> String raise SqlglotError

    Python self.expressions(...).

    Generator::extract_sql

    fn Generator::extract_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::fallbackproperty_sql

    fn Generator::fallbackproperty_sql(self : Generator, expression : Expr) -> String

    Generator::featuresattime_sql

    fn Generator::featuresattime_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::fetch_sql

    fn Generator::fetch_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::filter_sql

    fn Generator::filter_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::forclause_sql

    fn Generator::forclause_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::foreignkey_sql

    fn Generator::foreignkey_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::forin_sql

    fn Generator::forin_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::format_args

    fn Generator::format_args(self : Generator, args : Array[&SqlArg], sep? : String) -> String raise SqlglotError

    Generator::format_time

    fn Generator::format_time(self : Generator, expression : Expr, inverse_time_mapping? : Map[String, String], inverse_time_trie? : Trie) -> String? raise SqlglotError

    Virtual format_time.

    Generator::format_time_base

    fn Generator::format_time_base(self : Generator, expression : Expr, inverse_time_mapping? : Map[String, String], inverse_time_trie? : Trie) -> String? raise SqlglotError

    Generator::formatjson_sql

    fn Generator::formatjson_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::formatphrase_sql

    fn Generator::formatphrase_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::freespaceproperty_sql

    fn Generator::freespaceproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::from_sql

    fn Generator::from_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::fromiso8601date_sql

    fn Generator::fromiso8601date_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::fromiso8601timestamp_sql

    fn Generator::fromiso8601timestamp_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::fromiso8601timestampnanos_sql

    fn Generator::fromiso8601timestampnanos_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::fromtimezone_sql

    fn Generator::fromtimezone_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::func

    fn Generator::func(self : Generator, name : String, args : Array[&SqlArg], prefix? : String, suffix? : String, normalize? : Bool) -> String raise SqlglotError

    Generator::function_fallback_sql

    fn Generator::function_fallback_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::functionspecification_sql

    fn Generator::functionspecification_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::gapfill_sql

    fn Generator::gapfill_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generate

    fn Generator::generate(self : Generator, expression : Expr, copy? : Bool) -> String raise SqlglotError

    Generates the SQL string corresponding to the given syntax tree (virtual).

    Generator::generate_base

    fn Generator::generate_base(self : Generator, expression : Expr, copy? : Bool) -> String raise SqlglotError

    Generator::generatebool_sql

    fn Generator::generatebool_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generatedasidentitycolumnconstraint_sql

    fn Generator::generatedasidentitycolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generatedasrowcolumnconstraint_sql

    fn Generator::generatedasrowcolumnconstraint_sql(self : Generator, expression : Expr) -> String

    Generator::generatedouble_sql

    fn Generator::generatedouble_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generateembedding_sql

    fn Generator::generateembedding_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generateint_sql

    fn Generator::generateint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generatetable_sql

    fn Generator::generatetable_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::generatetext_sql

    fn Generator::generatetext_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::get_put_sql

    fn Generator::get_put_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::getextract_sql

    fn Generator::getextract_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::glob_sql

    fn Generator::glob_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::grant_or_revoke_sql

    fn Generator::grant_or_revoke_sql(self : Generator, expression : Expr, keyword~ : String, preposition~ : String, grant_option_prefix? : String, grant_option_suffix? : String) -> String raise SqlglotError

    Python _grant_or_revoke_sql.

    Generator::grant_sql

    fn Generator::grant_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::grantprincipal_sql

    fn Generator::grantprincipal_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::grantprivilege_sql

    fn Generator::grantprivilege_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::group_sql

    fn Generator::group_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::groupingsets_sql

    fn Generator::groupingsets_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::gt_sql

    fn Generator::gt_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::gte_sql

    fn Generator::gte_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::having_sql

    fn Generator::having_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::havingmax_sql

    fn Generator::havingmax_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::heredoc_sql

    fn Generator::heredoc_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::hex_sql

    fn Generator::hex_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::hexstring_sql

    fn Generator::hexstring_sql(self : Generator, expression : Expr, binary_function_repr? : String) -> String raise SqlglotError

    Generator::hexstring_sql_v

    fn Generator::hexstring_sql_v(self : Generator, expression : Expr, binary_function_repr? : String) -> String raise SqlglotError

    Virtual hexstring_sql(expression, binary_function_repr).

    Generator::hint_sql

    fn Generator::hint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::historicaldata_sql

    fn Generator::historicaldata_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::identifier_sql

    fn Generator::identifier_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::if_sql

    fn Generator::if_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::ifblock_sql

    fn Generator::ifblock_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::ignorenulls_sql

    fn Generator::ignorenulls_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::ilike_sql

    fn Generator::ilike_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::in_sql

    fn Generator::in_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::in_unnest_op

    fn Generator::in_unnest_op(self : Generator, unnest : Expr) -> String raise SqlglotError

    Virtual in_unnest_op.

    Generator::in_unnest_op_base

    fn Generator::in_unnest_op_base(self : Generator, unnest : Expr) -> String raise SqlglotError

    Generator::includeproperty_sql

    fn Generator::includeproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::indent

    fn Generator::indent(self : Generator, sql : String, level? : Int, pad? : Int, skip_first? : Bool, skip_last? : Bool) -> String

    Generator::index_sql

    fn Generator::index_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::indexcolumnconstraint_sql

    fn Generator::indexcolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::indexconstraintoption_sql

    fn Generator::indexconstraintoption_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::indexparameters_sql

    fn Generator::indexparameters_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::indextablehint_sql

    fn Generator::indextablehint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::initcap_sql

    fn Generator::initcap_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::inoutcolumnconstraint_sql

    fn Generator::inoutcolumnconstraint_sql(self : Generator, expression : Expr) -> String

    Generator::inputoutputformat_sql

    fn Generator::inputoutputformat_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::insert_sql

    fn Generator::insert_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::install_sql

    fn Generator::install_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::intdiv_sql

    fn Generator::intdiv_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::interval_sql

    fn Generator::interval_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::into_sql

    fn Generator::into_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::introducer_sql

    fn Generator::introducer_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::is_sql

    fn Generator::is_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::isolatedloadingproperty_sql

    fn Generator::isolatedloadingproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::iterate_sql

    fn Generator::iterate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::join_sql

    fn Generator::join_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::joinhint_sql

    fn Generator::joinhint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::journalproperty_sql

    fn Generator::journalproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::json_path_part

    fn Generator::json_path_part(self : Generator, expression : Value?) -> String raise SqlglotError

    Generator::json_sql

    fn Generator::json_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonarray_sql

    fn Generator::jsonarray_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonarrayagg_sql

    fn Generator::jsonarrayagg_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsoncast_sql

    fn Generator::jsoncast_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsoncolumndef_sql

    fn Generator::jsoncolumndef_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonexists_sql

    fn Generator::jsonexists_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonextractquote_sql

    fn Generator::jsonextractquote_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonkeyvalue_sql

    fn Generator::jsonkeyvalue_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonobject_sql

    fn Generator::jsonobject_sql(self : Generator, expression : Expr, name? : String) -> String raise SqlglotError

    Python _jsonobject_sql(expression, name).

    Generator::jsonpath_sql

    fn Generator::jsonpath_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonpathkey_sql

    fn Generator::jsonpathkey_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Python _jsonpathkey_sql.

    Generator::jsonpathsubscript_sql

    fn Generator::jsonpathsubscript_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Python _jsonpathsubscript_sql.

    Generator::jsonschema_sql

    fn Generator::jsonschema_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsontable_sql

    fn Generator::jsontable_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::jsonvalue_sql

    fn Generator::jsonvalue_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::kill_sql

    fn Generator::kill_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::kwarg_sql

    fn Generator::kwarg_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::lambda_sql

    fn Generator::lambda_sql(self : Generator, expression : Expr, arrow_sep? : String, wrap? : Bool) -> String raise SqlglotError

    Generator::lambda_sql_v

    fn Generator::lambda_sql_v(self : Generator, expression : Expr, arrow_sep? : String, wrap? : Bool) -> String raise SqlglotError

    Generator::lastday_sql

    fn Generator::lastday_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::lateral_op

    fn Generator::lateral_op(self : Generator, expression : Expr) -> String raise SqlglotError

    Virtual lateral_op.

    Generator::lateral_op_base

    fn Generator::lateral_op_base(self : Generator, expression : Expr) -> String

    Generator::lateral_sql

    fn Generator::lateral_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::leave_sql

    fn Generator::leave_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::like_sql

    fn Generator::like_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::like_sql_inner

    fn Generator::like_sql_inner(self : Generator, expression : Expr, escape? : Expr) -> String raise SqlglotError

    Python _like_sql(expression, escape).

    Generator::likeproperty_sql

    fn Generator::likeproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::limit_sql

    fn Generator::limit_sql(self : Generator, expression : Expr, top? : Bool) -> String raise SqlglotError

    Generator::limitoptions_sql

    fn Generator::limitoptions_sql(self : Generator, expression : Expr) -> String

    Generator::literal_sql

    fn Generator::literal_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::loaddata_sql

    fn Generator::loaddata_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::localtime_sql

    fn Generator::localtime_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::localtimestamp_sql

    fn Generator::localtimestamp_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::locate_properties

    fn Generator::locate_properties(self : Generator, properties : Expr) -> Map[PropertiesLocation, Array[Expr]] raise SqlglotError

    Virtual locate_properties.

    Generator::locate_properties_base

    fn Generator::locate_properties_base(self : Generator, properties : Expr) -> Map[PropertiesLocation, Array[Expr]] raise SqlglotError

    Generator::lock_sql

    fn Generator::lock_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::lockingproperty_sql

    fn Generator::lockingproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::log_sql

    fn Generator::log_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::loopblock_sql

    fn Generator::loopblock_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::lowerhex_sql

    fn Generator::lowerhex_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::lt_sql

    fn Generator::lt_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::lte_sql

    fn Generator::lte_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::macrooverload_sql

    fn Generator::macrooverload_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::macrooverloads_sql

    fn Generator::macrooverloads_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::maskingpolicycolumnconstraint_sql

    fn Generator::maskingpolicycolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::match_sql

    fn Generator::match_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::matchagainst_sql

    fn Generator::matchagainst_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::matchrecognize_sql

    fn Generator::matchrecognize_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::matchrecognizemeasure_sql

    fn Generator::matchrecognizemeasure_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::maybe_comment

    fn Generator::maybe_comment(self : Generator, sql : String, expression? : Expr, comments? : Array[String], separated? : Bool) -> String

    Generator::median_sql

    fn Generator::median_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::merge_sql

    fn Generator::merge_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::mergeblockratioproperty_sql

    fn Generator::mergeblockratioproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::mergetreettl_sql

    fn Generator::mergetreettl_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::mergetreettlaction_sql

    fn Generator::mergetreettlaction_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::ml_sql

    fn Generator::ml_sql(self : Generator, expression : Expr, name : String) -> String raise SqlglotError

    Python _ml_sql(expression, name).

    Generator::mlforecast_sql

    fn Generator::mlforecast_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::mltranslate_sql

    fn Generator::mltranslate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::mod_sql

    fn Generator::mod_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::modelattribute_sql

    fn Generator::modelattribute_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::modifycolumn_sql

    fn Generator::modifycolumn_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::moduleproperty_sql

    fn Generator::moduleproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::move_ctes_to_top_level

    fn Generator::move_ctes_to_top_level(self : Generator, expression : Expr) -> Expr

    Python _move_ctes_to_top_level.

    Generator::mul_sql

    fn Generator::mul_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::multitableinserts_sql

    fn Generator::multitableinserts_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::naked_property

    fn Generator::naked_property(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::national_sql

    fn Generator::national_sql(self : Generator, expression : Expr, prefix? : String) -> String raise SqlglotError

    Generator::neg_sql

    fn Generator::neg_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::neq_sql

    fn Generator::neq_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::new

    fn Generator::new(dialect : Dialect, pretty? : Bool, identify? : String, normalize? : Bool, pad? : Int, indent? : Int, normalize_functions? : String, unsupported_level? : ErrorLevel, max_unsupported? : Int, leading_comma? : Bool, max_text_width? : Int, comments? : Bool) -> Generator

    Generator::nextvaluefor_sql

    fn Generator::nextvaluefor_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::no_identify

    fn[T] Generator::no_identify(self : Generator, f : () -> T raise SqlglotError) -> T raise SqlglotError

    Runs f with identify disabled.

    Generator::normalize_func

    fn Generator::normalize_func(self : Generator, name : String) -> String

    Generator::not_sql

    fn Generator::not_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::notnullcolumnconstraint_sql

    fn Generator::notnullcolumnconstraint_sql(self : Generator, expression : Expr) -> String

    Generator::nthvalue_sql

    fn Generator::nthvalue_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::null_sql

    fn Generator::null_sql(self : Generator, expression : Expr) -> String

    Generator::nullsafeeq_sql

    fn Generator::nullsafeeq_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::nullsafeneq_sql

    fn Generator::nullsafeneq_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::nvl2_sql

    fn Generator::nvl2_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::objectidentifier_sql

    fn Generator::objectidentifier_sql(self : Generator, expression : Expr) -> String

    Generator::offset_limit_modifiers

    fn Generator::offset_limit_modifiers(self : Generator, expression : Expr, fetch : Bool, limit : Expr?) -> Array[String] raise SqlglotError

    Virtual offset_limit_modifiers.

    Generator::offset_limit_modifiers_base

    fn Generator::offset_limit_modifiers_base(self : Generator, expression : Expr, fetch : Bool, limit : Expr?) -> Array[String] raise SqlglotError

    Generator::offset_sql

    fn Generator::offset_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::oncluster_sql

    fn Generator::oncluster_sql(self : Generator, expression : Expr) -> String

    Generator::oncondition_sql

    fn Generator::oncondition_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::onconflict_sql

    fn Generator::onconflict_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::op_expressions

    fn Generator::op_expressions(self : Generator, op : String, expression : Expr, flat? : Bool) -> String raise SqlglotError

    Generator::opclass_sql

    fn Generator::opclass_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::openjson_sql

    fn Generator::openjson_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::openjsoncolumndef_sql

    fn Generator::openjsoncolumndef_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::options_modifier

    fn Generator::options_modifier(self : Generator, expression : Expr) -> String raise SqlglotError

    Virtual options_modifier.

    Generator::options_modifier_base

    fn Generator::options_modifier_base(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::or_sql

    fn Generator::or_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::order_sql

    fn Generator::order_sql(self : Generator, expression : Expr, flat? : Bool) -> String raise SqlglotError

    Generator::ordered_sql

    fn Generator::ordered_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::overflowtruncatebehavior_sql

    fn Generator::overflowtruncatebehavior_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::overlaps_sql

    fn Generator::overlaps_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::overlay_sql

    fn Generator::overlay_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::pad_sql

    fn Generator::pad_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::parameter_sql

    fn Generator::parameter_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::parameterizedagg_sql

    fn Generator::parameterizedagg_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::paren_sql

    fn Generator::paren_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::parsedatetime_sql

    fn Generator::parsedatetime_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::parsejson_sql

    fn Generator::parsejson_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partition_by_sql

    fn Generator::partition_by_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partition_sql

    fn Generator::partition_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partitionboundspec_sql

    fn Generator::partitionboundspec_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partitionbyrangeproperty_sql

    fn Generator::partitionbyrangeproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partitionbyrangepropertydynamic_sql

    fn Generator::partitionbyrangepropertydynamic_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partitionedofproperty_sql

    fn Generator::partitionedofproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::partitionrange_sql

    fn Generator::partitionrange_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::periodforsystemtimeconstraint_sql

    fn Generator::periodforsystemtimeconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::pivot_in_value_aliases

    fn Generator::pivot_in_value_aliases(self : Generator, expression : Expr) -> Array[Expr]? raise SqlglotError

    Python _pivot_in_value_aliases.

    Generator::pivot_sql

    fn Generator::pivot_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::pivotalias_sql

    fn Generator::pivotalias_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::placeholder_sql

    fn Generator::placeholder_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::pragma_sql

    fn Generator::pragma_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::predict_sql

    fn Generator::predict_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::prepend_ctes

    fn Generator::prepend_ctes(self : Generator, expression : Expr, sql : String) -> String raise SqlglotError

    Generator::preprocess

    fn Generator::preprocess(self : Generator, expression : Expr) -> Expr raise SqlglotError

    Apply generic preprocessing transformations to a given expression.

    Generator::preprocess_base

    fn Generator::preprocess_base(self : Generator, expression : Expr) -> Expr raise SqlglotError

    Generator::prewhere_sql

    fn Generator::prewhere_sql(self : Generator, expression : Expr) -> String

    Generator::primarykey_sql

    fn Generator::primarykey_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::primarykeycolumnconstraint_sql

    fn Generator::primarykeycolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::prior_sql

    fn Generator::prior_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::properties

    fn Generator::properties(self : Generator, properties : Expr, prefix? : String, sep? : String, suffix? : String, wrapped? : Bool) -> String raise SqlglotError

    Generator::properties_sql

    fn Generator::properties_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::property_location

    fn Generator::property_location(self : Generator, p : Expr) -> PropertiesLocation raise SqlglotError

    Generator::property_name

    fn Generator::property_name(self : Generator, expression : Expr, string_key? : Bool) -> String raise SqlglotError

    Generator::property_sql

    fn Generator::property_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::propertyeq_sql

    fn Generator::propertyeq_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::pseudocolumn_sql

    fn Generator::pseudocolumn_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::pseudotype_sql

    fn Generator::pseudotype_sql(self : Generator, expression : Expr) -> String

    Generator::qualify_sql

    fn Generator::qualify_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::query_modifiers

    fn Generator::query_modifiers(self : Generator, expression : Expr, sqls : Array[String]) -> String raise SqlglotError

    Generator::queryband_sql

    fn Generator::queryband_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::queryoption_sql

    fn Generator::queryoption_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::querytransform_sql

    fn Generator::querytransform_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::rand_sql

    fn Generator::rand_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::rawstring_sql

    fn Generator::rawstring_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::recursivewithsearch_sql

    fn Generator::recursivewithsearch_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::reference_sql

    fn Generator::reference_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::refresh_sql

    fn Generator::refresh_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::refreshtriggerproperty_sql

    fn Generator::refreshtriggerproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::renamecolumn_sql

    fn Generator::renamecolumn_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::renameindex_sql

    fn Generator::renameindex_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::repeatblock_sql

    fn Generator::repeatblock_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::replace_line_breaks

    fn Generator::replace_line_breaks(self : Generator, string : String) -> String

    Python _replace_line_breaks.

    Generator::resolve_ordered_for_null_ordering_simulation

    fn Generator::resolve_ordered_for_null_ordering_simulation(self : Generator, expression : Expr) -> Expr?

    Python _resolve_ordered_for_null_ordering_simulation.

    Generator::respectnulls_sql

    fn Generator::respectnulls_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::return_sql

    fn Generator::return_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::returning_sql

    fn Generator::returning_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::revoke_sql

    fn Generator::revoke_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::rollback_sql

    fn Generator::rollback_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::rollup_sql

    fn Generator::rollup_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::rollupindex_sql

    fn Generator::rollupindex_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::rollupproperty_sql

    fn Generator::rollupproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::root_properties

    fn Generator::root_properties(self : Generator, properties : Expr) -> String raise SqlglotError

    Generator::rowformatdelimitedproperty_sql

    fn Generator::rowformatdelimitedproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::safedivide_sql

    fn Generator::safedivide_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::sanitize_comment

    fn Generator::sanitize_comment(self : Generator, comment : String) -> String

    Generator::schema_columns_sql

    fn Generator::schema_columns_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::schema_sql

    fn Generator::schema_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::scope_resolution

    fn Generator::scope_resolution(self : Generator, rhs : String, scope_name : String) -> String raise SqlglotError

    Virtual scope_resolution.

    Generator::scope_resolution_base

    fn Generator::scope_resolution_base(self : Generator, rhs : String, scope_name : String) -> String raise SqlglotError

    Generator::scoperesolution_sql

    fn Generator::scoperesolution_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::seg

    fn Generator::seg(self : Generator, sql : String, sep? : String) -> String

    Generator::select_sql

    fn Generator::select_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::semanticview_sql

    fn Generator::semanticview_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::semicolon_sql

    fn Generator::semicolon_sql(self : Generator, expression : Expr) -> String

    Generator::sep

    fn Generator::sep(self : Generator, sep? : String) -> String

    Generator::sequenceproperties_sql

    fn Generator::sequenceproperties_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::sessionparameter_sql

    fn Generator::sessionparameter_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::set_operation

    fn Generator::set_operation(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::set_operations

    fn Generator::set_operations(self : Generator, expression : Expr) -> String raise SqlglotError

    Virtual set_operations.

    Generator::set_operations_base

    fn Generator::set_operations_base(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::set_sql

    fn Generator::set_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::setitem_sql

    fn Generator::setitem_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::show_sql

    fn Generator::show_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::similarto_sql

    fn Generator::similarto_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::simplify_unless_literal

    fn Generator::simplify_unless_literal(self : Generator, expression : Expr) -> Expr raise SqlglotError

    Generator::skipjsoncolumn_sql

    fn Generator::skipjsoncolumn_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::slice_sql

    fn Generator::slice_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::sort_sql

    fn Generator::sort_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::space_sql

    fn Generator::space_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::sql

    fn Generator::sql(self : Generator, expression : Expr?, comment? : Bool) -> String raise SqlglotError

    Generates SQL for an expression (Python self.sql(expression)).

    Generator::sql_key

    fn Generator::sql_key(self : Generator, expression : Expr, key : String) -> String raise SqlglotError

    Python self.sql(expression, key).

    Generator::sql_value

    fn Generator::sql_value(self : Generator, value : Value, comment? : Bool) -> String raise SqlglotError

    Python self.sql(value) for an argument value.

    Generator::star_sql

    fn Generator::star_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::storedprocedure_sql

    fn Generator::storedprocedure_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::string_sql

    fn Generator::string_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::strtodate_sql

    fn Generator::strtodate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::strtotime_sql

    fn Generator::strtotime_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::struct_sql

    fn Generator::struct_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::sub_sql

    fn Generator::sub_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::subquery_sql

    fn Generator::subquery_sql(self : Generator, expression : Expr, sep? : String) -> String raise SqlglotError

    Generator::summarize_sql

    fn Generator::summarize_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::table_parts

    fn Generator::table_parts(self : Generator, expression : Expr) -> String raise SqlglotError

    Virtual table_parts.

    Generator::table_parts_base

    fn Generator::table_parts_base(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::table_prefixed_sql

    fn Generator::table_prefixed_sql(self : Generator, expression : Expr, key : String) -> String raise SqlglotError

    Generator::table_sql

    fn Generator::table_sql(self : Generator, expression : Expr, sep? : String) -> String raise SqlglotError

    Generator::table_sql_v

    fn Generator::table_sql_v(self : Generator, expression : Expr, sep? : String) -> String raise SqlglotError

    Virtual table_sql(expression, sep).

    Generator::tablealias_sql

    fn Generator::tablealias_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tablefromrows_sql

    fn Generator::tablefromrows_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tablesample_sql

    fn Generator::tablesample_sql(self : Generator, expression : Expr, tablesample_keyword? : String) -> String raise SqlglotError

    Generator::tablesample_sql_v

    fn Generator::tablesample_sql_v(self : Generator, expression : Expr, tablesample_keyword? : String) -> String raise SqlglotError

    Virtual tablesample_sql(expression, tablesample_keyword).

    Generator::tag_sql

    fn Generator::tag_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::timeserieskey_sql

    fn Generator::timeserieskey_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::toarray_sql

    fn Generator::toarray_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tochar_sql

    fn Generator::tochar_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::todouble_sql

    fn Generator::todouble_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::token_sql

    fn Generator::token_sql(self : Generator, token_type : TokenType) -> String

    Generator::tonumber_cast_sql

    fn Generator::tonumber_cast_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Python _tonumber_cast_sql.

    Generator::tonumber_sql

    fn Generator::tonumber_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::too_wide

    fn Generator::too_wide(self : Generator, args : Array[String]) -> Bool

    Generator::transaction_sql

    fn Generator::transaction_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::translatecharacters_sql

    fn Generator::translatecharacters_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::triggerevent_sql

    fn Generator::triggerevent_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::triggerproperties_sql

    fn Generator::triggerproperties_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::triggerreferencing_sql

    fn Generator::triggerreferencing_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::trim_sql

    fn Generator::trim_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::truncatetable_sql

    fn Generator::truncatetable_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::try_sql

    fn Generator::try_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::trycast_sql

    fn Generator::trycast_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tsordstodate_sql

    fn Generator::tsordstodate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tsordstodatetime_sql

    fn Generator::tsordstodatetime_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tsordstotime_sql

    fn Generator::tsordstotime_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tsordstotimestamp_sql

    fn Generator::tsordstotimestamp_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::tuple_sql

    fn Generator::tuple_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::uncache_sql

    fn Generator::uncache_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::unicodestring_sql

    fn Generator::unicodestring_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::uniquecolumnconstraint_sql

    fn Generator::uniquecolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::uniquekeyproperty_sql

    fn Generator::uniquekeyproperty_sql(self : Generator, expression : Expr, prefix? : String) -> String raise SqlglotError

    Generator::uniquekeyproperty_sql_v

    fn Generator::uniquekeyproperty_sql_v(self : Generator, expression : Expr, prefix? : String) -> String raise SqlglotError

    Virtual uniquekeyproperty_sql(expression, prefix).

    Generator::unixdate_sql

    fn Generator::unixdate_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::unixseconds_sql

    fn Generator::unixseconds_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::unnest_sql

    fn Generator::unnest_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::unpivotcolumns_sql

    fn Generator::unpivotcolumns_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::unsupported

    fn Generator::unsupported(self : Generator, message : String) -> Unit raise SqlglotError

    Generator::unsupported_args

    fn Generator::unsupported_args(self : Generator, expression : Expr, args : Array[String]) -> Unit raise SqlglotError

    The @unsupported_args(...) decorator check.

    Generator::unsupported_stmt

    fn Generator::unsupported_stmt(self : Generator, message : String) -> String raise SqlglotError

    Generator::update_from_joins_sql

    fn Generator::update_from_joins_sql(self : Generator, expression : Expr) -> (String, String) raise SqlglotError

    Python _update_from_joins_sql: returns (join_sql, from_sql).

    Generator::update_sql

    fn Generator::update_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::use_sql

    fn Generator::use_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::userdefinedfunction_sql

    fn Generator::userdefinedfunction_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::usingproperty_sql

    fn Generator::usingproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::uuid_sql

    fn Generator::uuid_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::uuidproperty_sql

    fn Generator::uuidproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::values_sql

    fn Generator::values_sql(self : Generator, expression : Expr, values_as_table? : Bool) -> String raise SqlglotError

    Generator::values_sql_v

    fn Generator::values_sql_v(self : Generator, expression : Expr, values_as_table? : Bool) -> String raise SqlglotError

    Virtual values_sql(expression, values_as_table).

    Generator::var_sql

    fn Generator::var_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::vectorsearch_sql

    fn Generator::vectorsearch_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::version_sql

    fn Generator::version_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::watermarkcolumnconstraint_sql

    fn Generator::watermarkcolumnconstraint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::weekstart_name

    fn Generator::weekstart_name(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::weekstart_sql

    fn Generator::weekstart_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::when_sql

    fn Generator::when_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::whens_sql

    fn Generator::whens_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::where_sql

    fn Generator::where_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::whileblock_sql

    fn Generator::whileblock_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::window_sql

    fn Generator::window_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::windowspec_sql

    fn Generator::windowspec_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::with_properties

    fn Generator::with_properties(self : Generator, properties : Expr) -> String raise SqlglotError

    Virtual with_properties.

    Generator::with_properties_base

    fn Generator::with_properties_base(self : Generator, properties : Expr) -> String raise SqlglotError

    Generator::with_sql

    fn Generator::with_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::withdataproperty_sql

    fn Generator::withdataproperty_sql(self : Generator, expression : Expr) -> String

    Generator::withfill_sql

    fn Generator::withfill_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::withingroup_sql

    fn Generator::withingroup_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::withsystemversioningproperty_sql

    fn Generator::withsystemversioningproperty_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::withtablehint_sql

    fn Generator::withtablehint_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::wrap

    fn Generator::wrap(self : Generator, expression : Expr) -> String raise SqlglotError

    wrap(expression) for an expression.

    Generator::wrap_sql

    fn Generator::wrap_sql(self : Generator, this_sql : String) -> String

    Generator::wrap_str

    fn Generator::wrap_str(self : Generator, sql : String) -> String

    wrap(sql) for an already generated SQL string.

    Generator::xmlelement_sql

    fn Generator::xmlelement_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::xmlkeyvalueoption_sql

    fn Generator::xmlkeyvalueoption_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::xmlnamespace_sql

    fn Generator::xmlnamespace_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::xmltable_sql

    fn Generator::xmltable_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    Generator::xor_sql

    fn Generator::xor_sql(self : Generator, expression : Expr) -> String raise SqlglotError

    GeneratorConfig

    pub(all) struct GeneratorConfig {
    alter_set_type : String
    alter_set_wrapped : Bool
    alter_table_include_column_keyword : Bool
    array_concat_is_var_len : Bool
    array_size_dim_required : Bool?
    array_size_name : String
    auto_refresh_bare_intervals : Bool
    can_implement_array_any : Bool
    collate_is_func : Bool
    computed_column_with_type : Bool
    copy_has_into_keyword : Bool
    copy_params_are_wrapped : Bool
    copy_params_eq_required : Bool
    create_function_return_as : Bool
    cte_recursive_keyword_required : Bool
    data_type_specifiers_allowed : Bool
    declare_default_assignment : String
    directed_joins : Bool
    duplicate_key_update_with_set : Bool
    ensure_bools : Bool
    except_intersect_support_all_clause : Bool
    exclude_comments : Array[Kind]
    expressions_without_nested_ctes : Array[Kind]
    expression_precedes_properties_creatables :
    Set
    [String]
    extract_allows_quotes : Bool
    groupings_sep : String
    hex_func : String
    historical_data_post_alias : Bool
    ignore_nulls_before_order : Bool
    ignore_nulls_in_func : Bool
    index_on : String
    inout_separator : String
    insert_overwrite : String
    interval_allows_plural_form : Bool
    is_bool_allowed : Bool
    join_hints : Bool
    json_key_value_pair_sep : String
    json_path_bracketed_key_supported : Bool
    json_path_key_quoted_forces_brackets : Bool
    json_path_single_quote_escape : Bool
    json_type_required_for_extraction : Bool
    last_day_supports_date_part : Bool
    like_property_inside_schema : Bool
    limit_fetch : String
    limit_is_top : Bool
    limit_only_literals : Bool
    locking_reads_supported : Bool
    matched_by_source : Bool
    match_against_table_prefix : String?
    mod_operator : String
    mod_paren_parent_types : Array[Kind]
    multi_arg_distinct : Bool
    named_placeholder_token : String
    normalize_extract_date_parts : Bool
    null_ordering_supported : Bool?
    nvl2_supported : Bool
    pad_fill_pattern_is_required : Bool
    parameterizable_text_types : Array[DType]
    parameter_token : String
    parse_json_name : String?
    pivot_alias_with_as : Bool
    properties_location : Map[Kind, PropertiesLocation]
    query_hints : Bool
    query_hint_sep : String
    quote_json_path : Bool
    rename_table_with_db : Bool
    reserved_keywords :
    Set
    [String]
    respect_ignore_nulls_unsupported_expressions : Array[Kind]
    returning_end : Bool
    select_kinds : Array[String]
    semi_anti_join_with_side : Bool
    sentinel_line_break : String
    set_assignment_requires_variable_keyword : Bool
    set_op_limits : Bool
    set_op_modifiers : Bool
    set_op_parenthesized_operands : Bool
    single_string_interval : Bool
    star_except : String
    star_exclude_requires_derived_table : Bool
    struct_delimiter : Array[String]
    supported_json_path_parts : Array[Kind]
    supports_alter_column_if_exists : Bool
    supports_alter_column_nullability : Bool
    supports_between_flags : Bool
    supports_change_column : Bool
    supports_convert_timezone : Bool
    supports_create_table_like : Bool
    supports_decode_case : Bool
    supports_drop_alter_iceberg_property : Bool
    supports_exploding_projections : Bool
    supports_grouping_sets_as_suffix : Bool
    supports_like_quantifiers : Bool
    supports_median : Bool
    supports_merge_where : Bool
    supports_modify_column : Bool
    supports_named_cte_columns : Bool
    supports_select_into : Bool
    supports_single_arg_concat : Bool
    supports_table_alias_columns : Bool
    supports_table_copy : Bool
    supports_to_number : Bool
    supports_uescape : Bool
    supports_unix_seconds : Bool
    supports_unlogged_tables : Bool
    supports_window_exclude : Bool
    tablesample_keywords : String
    tablesample_requires_parens : Bool
    tablesample_seed_keyword : String
    tablesample_size_is_rows : Bool
    tablesample_with_method : Bool
    table_hints : Bool
    time_part_singulars : Map[String, String]
    token_mapping : Map[TokenType, String]
    try_supported : Bool
    type_mapping : Map[DType, String]
    tz_to_with_time_zone : Bool
    unnest_with_ordinality : Bool
    unpivot_aliases_are_identifiers : Bool
    unsupported_types : Array[DType]
    unwrapped_interval_values : Array[Kind]
    update_statement_supports_from : Bool
    values_as_table : Bool
    window_funcs_with_null_ordering : Array[Kind]
    with_properties_prefix : String
    with_separated_comments : Array[Kind]
    wrap_derived_values : Bool
    }

    Data attributes of the Python Generator class.

    GeneratorConfig::copy

    GeneratorFns

    pub(all) struct GeneratorFns {
    transforms : Map[Kind, (Generator, Expr) -> String raise SqlglotError]
    methods : Map[Kind, (Generator, Expr) -> String raise SqlglotError]
    hooks : GeneratorHooks
    type_param_settings : Map[DType, (Array[Int], Array[Int?])]
    after_having_modifier_transforms : Array[(String, (Generator, Expr) -> String raise SqlglotError)]
    }

    Callable class attributes of the Python Generator plus method override hooks.

    GeneratorFns::copy

    GeneratorHooks

    pub(all) struct GeneratorHooks {
    add_column_sql : (Generator, Expr) -> String raise SqlglotError?
    after_limit_modifiers : (Generator, Expr) -> Array[String] raise SqlglotError?
    column_parts : (Generator, Expr) -> String raise SqlglotError?
    createable_sql : (Generator, Expr, Map[PropertiesLocation, Array[Expr]]) -> String raise SqlglotError?
    format_time : (Generator, Expr, Map[String, String]?, Trie?) -> String? raise SqlglotError?
    generate : (Generator, Expr, Bool) -> String raise SqlglotError?
    in_unnest_op : (Generator, Expr) -> String raise SqlglotError?
    lateral_op : (Generator, Expr) -> String raise SqlglotError?
    locate_properties : (Generator, Expr) -> Map[PropertiesLocation, Array[Expr]] raise SqlglotError?
    offset_limit_modifiers : (Generator, Expr, Bool, Expr?) -> Array[String] raise SqlglotError?
    options_modifier : (Generator, Expr) -> String raise SqlglotError?
    scope_resolution : (Generator, String, String) -> String raise SqlglotError?
    set_operations : (Generator, Expr) -> String raise SqlglotError?
    table_parts : (Generator, Expr) -> String raise SqlglotError?
    with_properties : (Generator, Expr) -> String raise SqlglotError?
    preprocess : (Generator, Expr) -> Expr raise SqlglotError?
    alterrename_sql : (Generator, Expr, Bool) -> String raise SqlglotError?
    arrayinsert_sql : (Generator, Expr, Int) -> String raise SqlglotError?
    cast_sql : (Generator, Expr, String?) -> String raise SqlglotError?
    chr_sql : (Generator, Expr, String) -> String raise SqlglotError?
    columndef_sql : (Generator, Expr, String) -> String raise SqlglotError?
    hexstring_sql : (Generator, Expr, String?) -> String raise SqlglotError?
    lambda_sql : (Generator, Expr, String, Bool) -> String raise SqlglotError?
    table_sql : (Generator, Expr, String) -> String raise SqlglotError?
    tablesample_sql : (Generator, Expr, String?) -> String raise SqlglotError?
    uniquekeyproperty_sql : (Generator, Expr, String) -> String raise SqlglotError?
    values_sql : (Generator, Expr, Bool) -> String raise SqlglotError?
    unicode_substitute : (String) -> String?
    safe_json_path_key_re : (String) -> Bool?
    }

    Typed hooks for Generator methods that dialects override and that are called virtually from base code (or have extra parameters).

    GeneratorHooks::copy

    GeneratorHooks::new

    Kind

    pub(all) enum Kind {
    AIAgg
    AIClassify
    AIEmbed
    AIForecast
    AIGenerate
    AISimilarity
    AISummarizeAgg
    Abs
    Acos
    Acosh
    Add
    AddConstraint
    AddMonths
    AddPartition
    Adjacent
    Agg
    AggFunc
    AlgorithmProperty
    Alias
    Aliases
    All
    AllowedValuesProperty
    Alter
    AlterColumn
    AlterDistStyle
    AlterIndex
    AlterModifySqlSecurity
    AlterRename
    AlterSession
    AlterSet
    AlterSortKey
    Analyze
    AnalyzeColumns
    AnalyzeDelete
    AnalyzeHistogram
    AnalyzeListChainedRows
    AnalyzeSample
    AnalyzeStatistics
    AnalyzeValidate
    AnalyzeWith
    And
    Anonymous
    AnonymousAggFunc
    Any
    AnyValue
    ApiProperty
    ApplicationProperty
    Apply
    ApproxDistinct
    ApproxPercentileAccumulate
    ApproxPercentileCombine
    ApproxPercentileEstimate
    ApproxQuantile
    ApproxQuantiles
    ApproxTopK
    ApproxTopKAccumulate
    ApproxTopKCombine
    ApproxTopKEstimate
    ApproxTopSum
    ApproximateSimilarity
    ArgMax
    ArgMin
    Array
    ArrayAgg
    ArrayAll
    ArrayAny
    ArrayAppend
    ArrayCompact
    ArrayConcat
    ArrayConcatAgg
    ArrayConstructCompact
    ArrayContainedBy
    ArrayContains
    ArrayContainsAll
    ArrayDistinct
    ArrayExcept
    ArrayFilter
    ArrayFirst
    ArrayInsert
    ArrayIntersect
    ArrayLast
    ArrayMax
    ArrayMin
    ArrayOverlaps
    ArrayPosition
    ArrayPrepend
    ArrayRemove
    ArrayRemoveAt
    ArrayReverse
    ArraySize
    ArraySlice
    ArraySort
    ArraySum
    ArrayToString
    ArrayUnionAgg
    ArrayUniqueAgg
    ArraysZip
    Ascii
    Asin
    Asinh
    AssumeColumnConstraint
    AtIndex
    AtTimeZone
    Atan
    Atan2
    Atanh
    Attach
    AttachOption
    AutoIncrementColumnConstraint
    AutoIncrementProperty
    AutoRefreshProperty
    Avg
    BackupProperty
    Base64DecodeBinary
    Base64DecodeString
    Base64Encode
    Between
    Binary
    BinaryColumnConstraint
    BitLength
    BitString
    BitmapBitPosition
    BitmapBucketNumber
    BitmapConstructAgg
    BitmapCount
    BitmapOrAgg
    BitwiseAnd
    BitwiseAndAgg
    BitwiseCount
    BitwiseLeftShift
    BitwiseNot
    BitwiseOr
    BitwiseOrAgg
    BitwiseRightShift
    BitwiseXor
    BitwiseXorAgg
    Block
    BlockCompressionProperty
    Booland
    Boolean
    Boolnot
    Boolor
    BoolxorAgg
    Bracket
    BuildProperty
    ByteLength
    ByteString
    CTE
    Cache
    CalledOnNullInputProperty
    Case
    CaseSpecificColumnConstraint
    CaseStatement
    Cast
    CastToStrType
    CatalogProperty
    Cbrt
    Ceil
    Changes
    CharacterSet
    CharacterSetColumnConstraint
    CharacterSetProperty
    Check
    CheckColumnConstraint
    CheckJson
    CheckXml
    ChecksumProperty
    Chr
    CityHash64
    Clone
    Cluster
    ClusterProperty
    ClusteredByProperty
    ClusteredColumnConstraint
    Coalesce
    CodePointsToBytes
    CodePointsToString
    Collate
    CollateColumnConstraint
    CollateProperty
    Collation
    Column
    ColumnConstraint
    ColumnConstraintKind
    ColumnDef
    ColumnPosition
    ColumnPrefix
    Columns
    CombinedAggFunc
    CombinedParameterizedAgg
    Command
    Comment
    CommentColumnConstraint
    Commit
    Comprehension
    Compress
    CompressColumnConstraint
    ComputeProperty
    ComputedColumnConstraint
    Concat
    ConcatWs
    Condition
    ConditionalInsert
    Connect
    ConnectByRoot
    Connector
    Constraint
    Contains
    Convert
    ConvertTimezone
    ConvertToCharset
    Copy
    CopyGrantsProperty
    CopyParameter
    Corr
    Cos
    Cosh
    CosineDistance
    Cot
    Coth
    Count
    CountIf
    CovarPop
    CovarSamp
    Create
    Credentials
    CredentialsProperty
    Csc
    Csch
    Cube
    CumeDist
    CurrentAccount
    CurrentAccountName
    CurrentAvailableRoles
    CurrentCatalog
    CurrentClient
    CurrentDatabase
    CurrentDate
    CurrentDatetime
    CurrentIpAddress
    CurrentOrganizationName
    CurrentOrganizationUser
    CurrentRegion
    CurrentRole
    CurrentRoleType
    CurrentSchema
    CurrentSchemas
    CurrentSecondaryRoles
    CurrentSession
    CurrentStatement
    CurrentTime
    CurrentTimestamp
    CurrentTimestampLTZ
    CurrentTimezone
    CurrentTransaction
    CurrentUser
    CurrentUserId
    CurrentVersion
    CurrentWarehouse
    DDL
    DML
    DPipe
    DataBlocksizeProperty
    DataDeletionProperty
    DataType
    DataTypeParam
    DatabaseProperty
    Date
    DateAdd
    DateBin
    DateDiff
    DateFormatColumnConstraint
    DateFromParts
    DateFromUnixDate
    DateStrToDate
    DateSub
    DateToDateStr
    DateToDi
    DateTrunc
    Datetime
    DatetimeAdd
    DatetimeDiff
    DatetimeSub
    DatetimeTrunc
    Day
    DayOfMonth
    DayOfWeek
    DayOfWeekIso
    DayOfYear
    Dayname
    Declare
    DeclareItem
    Decode
    DecodeCase
    DecompressBinary
    DecompressString
    Decrypt
    DecryptRaw
    DefaultColumnConstraint
    DefinerProperty
    Degrees
    Delete
    DenseRank
    DerivedTable
    Describe
    Detach
    DiToDate
    DictProperty
    DictRange
    DictSubProperty
    Directory
    DirectoryStage
    DistKeyProperty
    DistStyleProperty
    Distance
    DistanceNd
    Distinct
    Distribute
    DistributedByProperty
    Div
    Dot
    DotProduct
    Drop
    DropPartition
    DropPrimaryKey
    DuplicateKeyProperty
    DynamicIdentifier
    DynamicProperty
    EQ
    Elt
    EmptyProperty
    Encode
    EncodeColumnConstraint
    EncodeProperty
    Encrypt
    EncryptRaw
    EndStatement
    EndsWith
    EngineProperty
    EnviromentProperty
    EphemeralColumnConstraint
    EqualNull
    Escape
    EuclideanDistance
    Except
    ExcludeColumnConstraint
    Execute
    ExecuteAsProperty
    ExecuteSql
    Exists
    Exp
    Explode
    ExplodeOuter
    ExplodingGenerateSeries
    Export
    Expression
    ExtendsLeft
    ExtendsRight
    ExternalProperty
    Extract
    Factorial
    FallbackProperty
    FarmFingerprint
    FeaturesAtTime
    Fetch
    FileFormatProperty
    Filter
    Final
    First
    FirstValue
    Flatten
    Float64
    Floor
    ForClause
    ForIn
    ForceProperty
    ForeignKey
    Format
    FormatJson
    FormatPhrase
    FreespaceProperty
    From
    FromBase
    FromBase32
    FromBase64
    FromISO8601Date
    FromISO8601Timestamp
    FromISO8601TimestampNanos
    FromJson
    FromTimeZone
    Func
    FunctionSpecification
    GT
    GTE
    GapFill
    GenerateBool
    GenerateDateArray
    GenerateDouble
    GenerateEmbedding
    GenerateInt
    GenerateSeries
    GenerateTable
    GenerateText
    GenerateTimestampArray
    GeneratedAsIdentityColumnConstraint
    GeneratedAsRowColumnConstraint
    Generator
    Get
    GetExtract
    GetIgnoreCase
    Getbit
    Glob
    GlobalProperty
    Grant
    GrantPrincipal
    GrantPrivilege
    Greatest
    Group
    GroupConcat
    Grouping
    GroupingId
    GroupingSets
    HandlerProperty
    HashAgg
    Having
    HavingMax
    HeapProperty
    Heredoc
    Hex
    HexDecodeString
    HexString
    Hint
    HistoricalData
    Hll
    Host
    Hour
    HybridProperty
    ILike
    IcebergProperty
    Identifier
    If
    IfBlock
    IgnoreNulls
    In
    InOutColumnConstraint
    IncludeProperty
    Index
    IndexColumnConstraint
    IndexConstraintOption
    IndexParameters
    IndexTableHint
    InheritsProperty
    Initcap
    Inline
    InlineLengthColumnConstraint
    InputModelProperty
    InputOutputFormat
    Insert
    Install
    Int64
    IntDiv
    Intersect
    Interval
    IntervalOp
    IntervalSpan
    Into
    Introducer
    InvisibleColumnConstraint
    Is
    IsArray
    IsAscii
    IsInf
    IsNan
    IsNullValue
    IsolatedLoadingProperty
    Iterate
    JSON
    JSONArray
    JSONArrayAgg
    JSONArrayAppend
    JSONArrayContains
    JSONArrayInsert
    JSONBContains
    JSONBContainsAllTopKeys
    JSONBContainsAnyTopKeys
    JSONBContainsTopKey
    JSONBDeleteAtPath
    JSONBExists
    JSONBExtract
    JSONBExtractScalar
    JSONBObjectAgg
    JSONBPathExists
    JSONBool
    JSONCast
    JSONColumnDef
    JSONExists
    JSONExtract
    JSONExtractArray
    JSONExtractQuote
    JSONExtractScalar
    JSONFormat
    JSONKeyValue
    JSONKeys
    JSONKeysAtDepth
    JSONObject
    JSONObjectAgg
    JSONPath
    JSONPathFilter
    JSONPathKey
    JSONPathPart
    JSONPathRecursive
    JSONPathRoot
    JSONPathScript
    JSONPathSelector
    JSONPathSlice
    JSONPathSubscript
    JSONPathUnion
    JSONPathWildcard
    JSONRemove
    JSONSchema
    JSONSet
    JSONStripNulls
    JSONTable
    JSONType
    JSONValue
    JSONValueArray
    JarowinklerSimilarity
    Join
    JoinHint
    JournalProperty
    JustifyDays
    JustifyHours
    JustifyInterval
    Kill
    Kurtosis
    Kwarg
    LT
    LTE
    Lag
    Lambda
    LanguageProperty
    Last
    LastDay
    LastValue
    Lateral
    LaxBool
    LaxFloat64
    LaxInt64
    LaxString
    Lead
    Least
    Leave
    Left
    Length
    Levenshtein
    Like
    LikeProperty
    Limit
    LimitOptions
    List
    Literal
    Ln
    LoadData
    Localtime
    Localtimestamp
    LocationProperty
    Lock
    LockProperty
    LockingProperty
    LockingStatement
    Log
    LogProperty
    LogicalAnd
    LogicalOr
    LoopBlock
    Lower
    LowerHex
    MD5
    MD5Digest
    MD5NumberLower64
    MD5NumberUpper64
    MLForecast
    MLTranslate
    MacroOverload
    MacroOverloads
    MakeInterval
    ManhattanDistance
    Map
    MapCat
    MapContainsKey
    MapDelete
    MapFromEntries
    MapInsert
    MapKeys
    MapPick
    MapSize
    MaskingPolicyColumnConstraint
    MaskingProperty
    Match
    MatchAgainst
    MatchRecognize
    MatchRecognizeMeasure
    MaterializedProperty
    Max
    Median
    Merge
    MergeBlockRatioProperty
    MergeTreeTTL
    MergeTreeTTLAction
    Min
    Minhash
    MinhashCombine
    Minute
    Mod
    Mode
    ModelAttribute
    ModifyColumn
    ModuleProperty
    Month
    Monthname
    MonthsBetween
    Mul
    MultitableInserts
    NEQ
    Nanvl
    National
    Neg
    Negative
    NestedJSONSelect
    NetFunc
    NetworkProperty
    NextDay
    NextValueFor
    NoPrimaryIndexProperty
    NonClusteredColumnConstraint
    Normal
    Normalize
    Not
    NotForReplicationColumnConstraint
    NotNullColumnConstraint
    NthValue
    Ntile
    Null
    NullSafeEQ
    NullSafeNEQ
    Nullif
    NumberToStr
    Nvl2
    ObjectAgg
    ObjectId
    ObjectIdentifier
    ObjectInsert
    ObjectTransform
    Offset
    OnCluster
    OnCommitProperty
    OnCondition
    OnConflict
    OnProperty
    OnUpdateColumnConstraint
    Opclass
    OpenJSON
    OpenJSONColumnDef
    Operator
    Or
    Order
    Ordered
    OutputModelProperty
    OverflowTruncateBehavior
    Overlaps
    Overlay
    Pad
    Parameter
    ParameterStyleProperty
    ParameterizedAgg
    Paren
    ParseBignumeric
    ParseDatetime
    ParseIp
    ParseJSON
    ParseNumeric
    ParseTime
    ParseUrl
    Partition
    PartitionBoundSpec
    PartitionByListProperty
    PartitionByRangeProperty
    PartitionByRangePropertyDynamic
    PartitionByTruncate
    PartitionId
    PartitionList
    PartitionRange
    PartitionedByBucket
    PartitionedByProperty
    PartitionedOfProperty
    PathColumnConstraint
    PercentRank
    PercentileCont
    PercentileDisc
    PeriodForSystemTimeConstraint
    Pi
    Pivot
    PivotAlias
    PivotAny
    Placeholder
    Posexplode
    PosexplodeOuter
    PositionalColumn
    Pow
    Pragma
    PreWhere
    Predicate
    Predict
    PreviousDay
    PrimaryKey
    PrimaryKeyColumnConstraint
    Prior
    ProjectionDef
    ProjectionPolicyColumnConstraint
    Properties
    Property
    PropertyEQ
    PseudoType
    Pseudocolumn
    Put
    Qualify
    Quantile
    Quarter
    Query
    QueryBand
    QueryOption
    QueryTransform
    Radians
    Rand
    Randn
    Randstr
    RangeBucket
    RangeN
    Rank
    RawString
    ReadCSV
    ReadParquet
    RecursiveWithSearch
    Reduce
    Reference
    Refresh
    RefreshTriggerProperty
    RegDomain
    RegexpCount
    RegexpExtract
    RegexpExtractAll
    RegexpFullMatch
    RegexpILike
    RegexpInstr
    RegexpLike
    RegexpReplace
    RegexpSplit
    RegexpSubstr
    RegrAvgx
    RegrAvgy
    RegrCount
    RegrIntercept
    RegrR2
    RegrSlope
    RegrSxx
    RegrSxy
    RegrSyy
    RegrValx
    RegrValy
    RemoteWithConnectionModelProperty
    RenameColumn
    RenameIndex
    Repeat
    RepeatBlock
    Replace
    ReplacePartition
    RespectNulls
    Return
    Returning
    ReturnsProperty
    Reverse
    Revoke
    Right
    Rint
    Rollback
    Rollup
    RollupIndex
    RollupProperty
    Round
    RowAccessProperty
    RowFormatDelimitedProperty
    RowFormatProperty
    RowFormatSerdeProperty
    RowNumber
    RtrimmedLength
    SHA
    SHA1Digest
    SHA2
    SHA2Digest
    SafeAdd
    SafeConvertBytesToString
    SafeDivide
    SafeFunc
    SafeMultiply
    SafeNegate
    SafeSubtract
    SampleProperty
    Schema
    SchemaCommentProperty
    ScopeResolution
    Search
    SearchIp
    Sec
    Sech
    Second
    Secret
    SecureProperty
    SecurityIntegrationProperty
    Select
    Selectable
    SemanticView
    Semicolon
    Seq1
    Seq2
    Seq4
    Seq8
    SequenceProperties
    SerdeProperties
    SessionParameter
    SessionUser
    Set
    SetConfigProperty
    SetItem
    SetOperation
    SetProperty
    SettingsProperty
    SharingProperty
    Show
    Shuffle
    Sign
    SimilarTo
    Sin
    Sinh
    Skewness
    SkipJSONColumn
    Slice
    Sort
    SortArray
    SortKeyProperty
    Soundex
    SoundexP123
    Space
    Split
    SplitPart
    SqlReadWriteProperty
    SqlSecurityProperty
    Sqrt
    StDistance
    StPoint
    StabilityProperty
    Stack
    StandardHash
    Star
    StarMap
    StartsWith
    Stddev
    StddevPop
    StddevSamp
    StorageHandlerProperty
    StoredProcedure
    StrPosition
    StrToDate
    StrToMap
    StrToTime
    StrToUnix
    Stream
    StreamingTableProperty
    StrictProperty
    String
    StringToArray
    StripNullValue
    Strtok
    StrtokToArray
    Struct
    StructExtract
    Stuff
    Sub
    Subquery
    SubqueryPredicate
    Substring
    SubstringIndex
    Sum
    Summarize
    SwapTable
    Systimestamp
    Table
    TableAlias
    TableColumn
    TableFromRows
    TableSample
    Tag
    Tags
    Tan
    Tanh
    TemporaryProperty
    Time
    TimeAdd
    TimeDiff
    TimeFromParts
    TimeSlice
    TimeStrToDate
    TimeStrToTime
    TimeStrToUnix
    TimeSub
    TimeToStr
    TimeToTimeStr
    TimeToUnix
    TimeTrunc
    TimeUnit
    TimeseriesKey
    Timestamp
    TimestampAdd
    TimestampDiff
    TimestampFromParts
    TimestampLtzFromParts
    TimestampSub
    TimestampTrunc
    TimestampTzFromParts
    TitleColumnConstraint
    ToArray
    ToBase32
    ToBase64
    ToBinary
    ToBoolean
    ToChar
    ToCodePoints
    ToDays
    ToDecfloat
    ToDouble
    ToFile
    ToMap
    ToNumber
    ToTableProperty
    ToVariant
    Transaction
    Transform
    TransformModelProperty
    TransientProperty
    Translate
    TranslateCharacters
    TriggerEvent
    TriggerExecute
    TriggerProperties
    TriggerReferencing
    Trim
    Trunc
    TruncateTable
    Try
    TryBase64DecodeBinary
    TryBase64DecodeString
    TryCast
    TryHexDecodeBinary
    TryHexDecodeString
    TryToDecfloat
    TsOrDiToDi
    TsOrDsAdd
    TsOrDsDiff
    TsOrDsToDate
    TsOrDsToDateStr
    TsOrDsToDatetime
    TsOrDsToTime
    TsOrDsToTimestamp
    Tuple
    Typeof
    UDTF
    Unary
    Uncache
    Undrop
    Unhex
    Unicode
    UnicodeString
    Uniform
    Union
    UniqueColumnConstraint
    UniqueKeyProperty
    UnixDate
    UnixMicros
    UnixMillis
    UnixSeconds
    UnixToStr
    UnixToTime
    UnixToTimeStr
    UnloggedProperty
    Unnest
    UnpivotColumns
    Update
    Upper
    UppercaseColumnConstraint
    Use
    UserDefinedFunction
    UsingData
    UsingProperty
    UsingTemplateProperty
    UtcDate
    UtcTime
    UtcTimestamp
    Uuid
    UuidProperty
    Values
    Var
    VarMap
    Variadic
    Variance
    VariancePop
    VectorSearch
    Version
    ViewAttributeProperty
    VirtualProperty
    VolatileProperty
    WatermarkColumnConstraint
    Week
    WeekOfYear
    WeekStart
    When
    Whens
    Where
    WhileBlock
    WidthBucket
    Window
    WindowSpec
    With
    WithDataProperty
    WithFill
    WithJournalTableProperty
    WithOperator
    WithProcedureOptions
    WithSchemaBindingProperty
    WithSystemVersioningProperty
    WithTableHint
    WithinGroup
    XMLElement
    XMLGet
    XMLKeyValueOption
    XMLNamespace
    XMLTable
    Xor
    Year
    YearOfWeek
    YearOfWeekIso
    ZeroFillColumnConstraint
    Zipf
    PrivExplodeOuter
    PrivTimeUnit
    } derive(Eq, Hash)

    Every expression class of sqlglot, including abstract traits.
    impl Show for Kind

    Kind::arg_types

    fn Kind::arg_types(self : Kind) -> FixedArray[(String, Bool)]

    Kind::class_path

    fn Kind::class_path(self : Kind) -> String

    Python str(cls), e.g. <class 'sqlglot.expressions.query.Select'>.

    Kind::has_arg

    fn Kind::has_arg(self : Kind, key : String) -> Bool

    Kind::hash_raw_args

    fn Kind::hash_raw_args(self : Kind) -> Bool

    Kind::id

    fn Kind::id(self : Kind) -> Int

    Kind::is_a

    fn Kind::is_a(self : Kind, base : Kind) -> Bool

    Whether self is base or a subclass of base (Python issubclass).

    Kind::is_any

    fn Kind::is_any(self : Kind, bases : ArrayView[Kind]) -> Bool

    Whether self is a subclass of any of the given kinds.

    Kind::is_cast

    fn Kind::is_cast(self : Kind) -> Bool

    Kind::is_data_type

    fn Kind::is_data_type(self : Kind) -> Bool

    Kind::is_primitive

    fn Kind::is_primitive(self : Kind) -> Bool

    Kind::is_subquery

    fn Kind::is_subquery(self : Kind) -> Bool

    Kind::is_trait

    fn Kind::is_trait(self : Kind) -> Bool

    Whether this kind is an abstract trait (e.g. Func, Binary) rather than a concrete node.

    Kind::is_var_len_args

    fn Kind::is_var_len_args(self : Kind) -> Bool

    Kind::key

    fn Kind::key(self : Kind) -> String

    The lowercase key of this kind, e.g. select.

    Kind::module_name

    fn Kind::module_name(self : Kind) -> String

    The Python module defining this kind, e.g. sqlglot.expressions.query.

    Kind::name

    fn Kind::name(self : Kind) -> String

    The Python class name of this kind, e.g. Select.

    Kind::owner_alias

    fn Kind::owner_alias(self : Kind) -> Kind?

    The class in the MRO of self that defines alias (None for the base Expression).

    Kind::owner_alias_or_name

    fn Kind::owner_alias_or_name(self : Kind) -> Kind?

    The class in the MRO of self that defines alias_or_name (None for the base Expression).

    Kind::owner_catalog

    fn Kind::owner_catalog(self : Kind) -> Kind?

    The class in the MRO of self that defines catalog (None for the base Expression).

    Kind::owner_columns

    fn Kind::owner_columns(self : Kind) -> Kind?

    The class in the MRO of self that defines columns (None for the base Expression).

    Kind::owner_ctes

    fn Kind::owner_ctes(self : Kind) -> Kind?

    The class in the MRO of self that defines ctes (None for the base Expression).

    Kind::owner_db

    fn Kind::owner_db(self : Kind) -> Kind?

    The class in the MRO of self that defines db (None for the base Expression).

    Kind::owner_is_int

    fn Kind::owner_is_int(self : Kind) -> Kind?

    The class in the MRO of self that defines is_int (None for the base Expression).

    Kind::owner_is_number

    fn Kind::owner_is_number(self : Kind) -> Kind?

    The class in the MRO of self that defines is_number (None for the base Expression).

    Kind::owner_is_star

    fn Kind::owner_is_star(self : Kind) -> Kind?

    The class in the MRO of self that defines is_star (None for the base Expression).

    Kind::owner_is_string

    fn Kind::owner_is_string(self : Kind) -> Kind?

    The class in the MRO of self that defines is_string (None for the base Expression).

    Kind::owner_is_type

    fn Kind::owner_is_type(self : Kind) -> Kind?

    The class in the MRO of self that defines is_type (None for the base Expression).

    Kind::owner_kind

    fn Kind::owner_kind(self : Kind) -> Kind?

    The class in the MRO of self that defines kind (None for the base Expression).

    Kind::owner_left

    fn Kind::owner_left(self : Kind) -> Kind?

    The class in the MRO of self that defines left (None for the base Expression).

    Kind::owner_method

    fn Kind::owner_method(self : Kind) -> Kind?

    The class in the MRO of self that defines method (None for the base Expression).

    Kind::owner_name

    fn Kind::owner_name(self : Kind) -> Kind?

    The class in the MRO of self that defines name (None for the base Expression).

    Kind::owner_named_selects

    fn Kind::owner_named_selects(self : Kind) -> Kind?

    The class in the MRO of self that defines named_selects (None for the base Expression).

    Kind::owner_output_name

    fn Kind::owner_output_name(self : Kind) -> Kind?

    The class in the MRO of self that defines output_name (None for the base Expression).

    Kind::owner_parts

    fn Kind::owner_parts(self : Kind) -> Kind?

    The class in the MRO of self that defines parts (None for the base Expression).

    Kind::owner_right

    fn Kind::owner_right(self : Kind) -> Kind?

    The class in the MRO of self that defines right (None for the base Expression).

    Kind::owner_selects

    fn Kind::owner_selects(self : Kind) -> Kind?

    The class in the MRO of self that defines selects (None for the base Expression).

    Kind::owner_side

    fn Kind::owner_side(self : Kind) -> Kind?

    The class in the MRO of self that defines side (None for the base Expression).

    Kind::owner_table

    fn Kind::owner_table(self : Kind) -> Kind?

    The class in the MRO of self that defines table (None for the base Expression).

    Kind::owner_this

    fn Kind::owner_this(self : Kind) -> Kind?

    The class in the MRO of self that defines this (None for the base Expression).

    Kind::owner_to

    fn Kind::owner_to(self : Kind) -> Kind?

    The class in the MRO of self that defines to (None for the base Expression).

    Kind::owner_to_py

    fn Kind::owner_to_py(self : Kind) -> Kind?

    The class in the MRO of self that defines to_py (None for the base Expression).

    Kind::owner_unit

    fn Kind::owner_unit(self : Kind) -> Kind?

    The class in the MRO of self that defines unit (None for the base Expression).

    Kind::owner_unnest

    fn Kind::owner_unnest(self : Kind) -> Kind?

    The class in the MRO of self that defines unnest (None for the base Expression).

    Kind::sql_name

    fn Kind::sql_name(self : Kind) -> String

    Kind::sql_names

    fn Kind::sql_names(self : Kind) -> FixedArray[String]

    SQL names of a function kind (first is the canonical one).

    Kind::var_len_arg_key

    fn Kind::var_len_arg_key(self : Kind) -> String

    NormalizationStrategy

    pub(all) enum NormalizationStrategy {
    Lowercase
    Uppercase
    CaseSensitive
    CaseInsensitive
    CaseInsensitiveUppercase
    } derive(Eq, Hash,
    Debug
    )

    How a dialect normalizes identifiers.

    NumericEscape

    pub(all) struct NumericEscape {
    base : Int
    min_digits : Int
    max_digits : Int
    max_value : Int
    }

    Numeric escape specification: (base, min digits, max digits, max value).

    ParseErrorInfo

    pub(all) struct ParseErrorInfo {
    description : String
    line : Int
    col : Int
    start_context : String
    highlight : String
    end_context : String
    into_expression : String?
    } derive(
    Debug
    )

    Details of a single parse error.

    Parser

    pub(all) struct Parser {
    dialect : Dialect
    cfg : ParserConfig
    fns : ParserFns
    error_level : ErrorLevel
    error_message_context : Int
    max_errors : Int
    max_nodes : Int
    sql : String
    sql_offsets : Array[Int]?
    errors : Array[SqlglotError]
    tokens : Array[Token]
    tokens_size : Int
    index : Int
    curr : Token
    next : Token
    prev : Token
    prev_comments : Array[String]
    pipe_cte_counter : Int
    chunks : Array[Array[Token]]
    chunk_index : Int
    node_count : Int
    }

    Parser consumes a list of tokens produced by the Tokenizer and produces a parsed syntax tree.

    Parser::add_comments

    fn Parser::add_comments(self : Parser, expression : Expr?) -> Unit

    Parser::advance

    fn Parser::advance(self : Parser, times? : Int) -> Unit

    Parser::advance_any

    fn Parser::advance_any(self : Parser, ignore_reserved? : Bool) -> Token?

    Parser::advance_chunk

    fn Parser::advance_chunk(self : Parser) -> Unit

    Parser::andl

    fn Parser::andl(self : Parser, cond : Bool, f : () -> Array[Expr] raise SqlglotError) -> Value? raise SqlglotError

    Python cond and f() where f returns a list.

    Parser::andv

    fn Parser::andv(self : Parser, cond : Bool, f : () -> Expr? raise SqlglotError) -> Value? raise SqlglotError

    Python cond and f(): False when cond is false, else the result of f().

    Parser::build_cast

    fn Parser::build_cast(self : Parser, strict : Bool, kwargs : Array[(String, Value?)]) -> Expr raise SqlglotError

    Parser::build_cast_base

    fn Parser::build_cast_base(self : Parser, strict : Bool, kwargs : Array[(String, Value?)]) -> Expr raise SqlglotError

    Parser::build_json_extract

    fn Parser::build_json_extract(self : Parser, this : Expr?, path_parts : Array[Expr]) -> (Expr?, Array[Expr]) raise SqlglotError

    Parser::build_pipe_cte

    fn Parser::build_pipe_cte(self : Parser, query : Expr, expressions : Array[Expr], alias_cte? : Expr) -> Expr

    Parser::can_parse_limit_or_offset

    fn Parser::can_parse_limit_or_offset(self : Parser) -> Bool

    Parser::can_parse_named_window

    fn Parser::can_parse_named_window(self : Parser) -> Bool

    Parser::check_errors

    fn Parser::check_errors(self : Parser) -> Unit raise SqlglotError

    Logs or raises any found errors, depending on the chosen error level setting.

    Parser::dialect_sql

    fn Parser::dialect_sql(self : Parser, e : Expr) -> String raise SqlglotError

    Python f"{expr}": the SQL of an expression with the base dialect.

    Parser::expression

    fn Parser::expression(self : Parser, instance : Expr, token? : Token, comments? : Array[String]) -> Expr raise SqlglotError

    Creates a new, validated Expr: attaches comments and position info.

    Parser::expression_opt

    fn Parser::expression_opt(self : Parser, instance : Expr?) -> Expr? raise SqlglotError

    self.expression(...) for an optional instance.

    Parser::find_parser

    fn[V] Parser::find_parser(self : Parser, parsers : Map[String, V], trie : WordTrie) -> V?

    Parser::find_sql

    fn Parser::find_sql(self : Parser, start : Token, end : Token) -> String

    Parser::identifier_expression

    fn Parser::identifier_expression(self : Parser, token? : Token, quoted? : Bool) -> Expr raise SqlglotError

    Parser::implicit_unnests_to_explicit

    fn Parser::implicit_unnests_to_explicit(self : Parser, this : Expr) -> Expr

    Parser::is_connected

    fn Parser::is_connected(self : Parser) -> Bool

    Parser::kv_to_prop_eq

    fn Parser::kv_to_prop_eq(self : Parser, expressions : Array[Expr], parse_map? : Bool) -> Array[Expr] raise SqlglotError

    Parser::match_

    fn Parser::match_(self : Parser, token_type : TokenType, advance? : Bool, expression? : Expr) -> Bool

    Parser::match_any

    fn Parser::match_any(self : Parser, types : ArrayView[TokenType], advance? : Bool) -> Bool

    Parser::match_keys

    fn[V] Parser::match_keys(self : Parser, m : Map[TokenType, V], advance? : Bool) -> Bool

    Parser::match_l_paren

    fn Parser::match_l_paren(self : Parser, expression? : Expr) -> Unit raise SqlglotError

    Parser::match_pair

    fn Parser::match_pair(self : Parser, a : TokenType, b : TokenType, advance? : Bool) -> Bool

    Parser::match_r_paren

    fn Parser::match_r_paren(self : Parser, expression? : Expr) -> Unit raise SqlglotError

    Parser::match_set

    fn Parser::match_set(self : Parser, types : TokenSet, advance? : Bool) -> Bool

    Parser::match_set_text

    fn Parser::match_set_text(self : Parser, types : TokenSet) -> String?

    self._match_set(types) and self._prev.text.upper()

    Parser::match_text

    fn Parser::match_text(self : Parser, text : String, advance? : Bool) -> Bool

    self._match_text_seq("X") for a single keyword.

    Parser::match_text_keys

    fn[V] Parser::match_text_keys(self : Parser, texts : Map[String, V], advance? : Bool) -> Bool

    Parser::match_text_seq

    fn Parser::match_text_seq(self : Parser, texts : ArrayView[String], advance? : Bool) -> Bool

    Parser::match_text_set

    fn Parser::match_text_set(self : Parser, texts :
    Set
    [String], advance? : Bool) -> Bool

    Parser::match_texts

    fn Parser::match_texts(self : Parser, texts : ArrayView[String], advance? : Bool) -> Bool

    Parser::match_texts_upper

    fn Parser::match_texts_upper(self : Parser, texts : ArrayView[String]) -> String?

    self._match_texts(texts) and self._prev.text.upper()

    Parser::negate_range

    fn Parser::negate_range(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::negate_range_base

    fn Parser::negate_range_base(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::new

    fn Parser::new(dialect : Dialect, error_level? : ErrorLevel, error_message_context? : Int, max_errors? : Int, max_nodes? : Int) -> Parser

    Parser::normalize_collate

    fn Parser::normalize_collate(self : Parser, collate : Expr) -> Unit

    Parser::parse

    fn Parser::parse(self : Parser, raw_tokens : Array[Token], sql : String) -> Array[Expr?] raise SqlglotError

    Parses a list of tokens and returns a list of syntax trees, one tree per parsed SQL statement.

    Parser::parse_add_column

    fn Parser::parse_add_column(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alias

    fn Parser::parse_alias(self : Parser, this : Expr?, explicit? : Bool) -> Expr? raise SqlglotError

    Parser::parse_alias_base

    fn Parser::parse_alias_base(self : Parser, this : Expr?, explicit? : Bool) -> Expr? raise SqlglotError

    Parser::parse_alter

    fn Parser::parse_alter(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_diststyle

    fn Parser::parse_alter_diststyle(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_drop_action

    fn Parser::parse_alter_drop_action(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_session

    fn Parser::parse_alter_session(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_sortkey

    fn Parser::parse_alter_sortkey(self : Parser, compound? : Bool) -> Expr? raise SqlglotError

    Parser::parse_alter_table_add

    fn Parser::parse_alter_table_add(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_alter_table_alter

    fn Parser::parse_alter_table_alter(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_table_alter_base

    fn Parser::parse_alter_table_alter_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_table_drop

    fn Parser::parse_alter_table_drop(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_alter_table_rename

    fn Parser::parse_alter_table_rename(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_table_rename_base

    fn Parser::parse_alter_table_rename_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_table_set

    fn Parser::parse_alter_table_set(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_alter_table_set_base

    fn Parser::parse_alter_table_set_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze

    fn Parser::parse_analyze(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze_columns

    fn Parser::parse_analyze_columns(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze_delete

    fn Parser::parse_analyze_delete(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze_histogram

    fn Parser::parse_analyze_histogram(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze_list

    fn Parser::parse_analyze_list(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze_statistics

    fn Parser::parse_analyze_statistics(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_analyze_validate

    fn Parser::parse_analyze_validate(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_as_command

    fn Parser::parse_as_command(self : Parser, start : Token) -> Expr

    Parser::parse_assignment

    fn Parser::parse_assignment(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_assignment_base

    fn Parser::parse_assignment_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_at_time_zone

    fn Parser::parse_at_time_zone(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_atom

    fn Parser::parse_atom(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_auto_increment

    fn Parser::parse_auto_increment(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_auto_property

    fn Parser::parse_auto_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_batch_statements

    fn Parser::parse_batch_statements(self : Parser, parse_method : (Parser) -> Expr? raise SqlglotError, sep_first_statement? : Bool) -> Array[Expr?] raise SqlglotError

    Parser::parse_between

    fn Parser::parse_between(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_binary_level

    fn Parser::parse_binary_level(self : Parser, table : Map[TokenType, Kind], next : () -> Expr? raise SqlglotError) -> Expr? raise SqlglotError

    Parses a left-associative binary operator level.

    Parser::parse_bitwise

    fn Parser::parse_bitwise(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_block

    fn Parser::parse_block(self : Parser) -> Expr raise SqlglotError

    Parser::parse_blockcompression

    fn Parser::parse_blockcompression(self : Parser) -> Expr raise SqlglotError

    Parser::parse_boolean

    fn Parser::parse_boolean(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_bracket

    fn Parser::parse_bracket(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_bracket_base

    fn Parser::parse_bracket_base(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_bracket_key_value

    fn Parser::parse_bracket_key_value(self : Parser, is_map? : Bool) -> Expr? raise SqlglotError

    Parser::parse_cache

    fn Parser::parse_cache(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_called_on_null_input_property

    fn Parser::parse_called_on_null_input_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_case

    fn Parser::parse_case(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_cast

    fn Parser::parse_cast(self : Parser, strict : Bool, safe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_ceil_floor

    fn Parser::parse_ceil_floor(self : Parser, kind : Kind) -> Expr? raise SqlglotError

    Parser::parse_changes

    fn Parser::parse_changes(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_char

    fn Parser::parse_char(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_character_set

    fn Parser::parse_character_set(self : Parser, default? : Bool) -> Expr raise SqlglotError

    Parser::parse_charset_name

    fn Parser::parse_charset_name(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_check_constraint

    fn Parser::parse_check_constraint(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_check_constraint_base

    fn Parser::parse_check_constraint_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_checksum

    fn Parser::parse_checksum(self : Parser) -> Expr raise SqlglotError

    Parser::parse_cluster

    fn Parser::parse_cluster(self : Parser) -> Expr raise SqlglotError

    Parser::parse_cluster_property

    fn Parser::parse_cluster_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_cluster_property_base

    fn Parser::parse_cluster_property_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_clustered_by

    fn Parser::parse_clustered_by(self : Parser) -> Expr raise SqlglotError

    Parser::parse_colon_as_variant_extract

    fn Parser::parse_colon_as_variant_extract(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_column

    fn Parser::parse_column(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_column_base

    fn Parser::parse_column_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_column_constraint

    fn Parser::parse_column_constraint(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_column_constraint_base

    fn Parser::parse_column_constraint_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_column_def

    fn Parser::parse_column_def(self : Parser, this : Expr?, computed_column? : Bool) -> Expr? raise SqlglotError

    Parser::parse_column_def_base

    fn Parser::parse_column_def_base(self : Parser, this : Expr?, computed_column? : Bool) -> Expr? raise SqlglotError

    Parser::parse_column_def_with_exists

    fn Parser::parse_column_def_with_exists(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_column_ops

    fn Parser::parse_column_ops(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_column_ops_base

    fn Parser::parse_column_ops_base(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_column_parts_fast

    fn Parser::parse_column_parts_fast(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_column_reference

    fn Parser::parse_column_reference(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_command

    fn Parser::parse_command(self : Parser) -> Expr raise SqlglotError

    Parser::parse_comment

    fn Parser::parse_comment(self : Parser, allow_exists? : Bool) -> Expr? raise SqlglotError

    Parser::parse_commit_or_rollback

    fn Parser::parse_commit_or_rollback(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_commit_or_rollback_base

    fn Parser::parse_commit_or_rollback_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_comparison

    fn Parser::parse_comparison(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_composite_key_property

    fn Parser::parse_composite_key_property(self : Parser, kind : Kind) -> Expr raise SqlglotError

    Parser::parse_comprehension

    fn Parser::parse_comprehension(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_compress

    fn Parser::parse_compress(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_condition

    fn Parser::parse_condition(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_conjunction

    fn Parser::parse_conjunction(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_connect

    fn Parser::parse_connect(self : Parser, skip_start_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_connect_with_prior

    fn Parser::parse_connect_with_prior(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_connect_with_prior_base

    fn Parser::parse_connect_with_prior_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_connector_function

    fn Parser::parse_connector_function(self : Parser, connector : Kind) -> Expr? raise SqlglotError

    Parser::parse_constraint

    fn Parser::parse_constraint(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_constraint_base

    fn Parser::parse_constraint_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_contains_property

    fn Parser::parse_contains_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_convert

    fn Parser::parse_convert(self : Parser, strict : Bool, safe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_convert_base

    fn Parser::parse_convert_base(self : Parser, strict : Bool, safe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_copy

    fn Parser::parse_copy(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_copy_parameters

    fn Parser::parse_copy_parameters(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_copy_property

    fn Parser::parse_copy_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_create

    fn Parser::parse_create(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_create_base

    fn Parser::parse_create_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_create_like

    fn Parser::parse_create_like(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_credentials

    fn Parser::parse_credentials(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_csv

    fn Parser::parse_csv(self : Parser, parse_method : () -> Expr? raise SqlglotError, sep? : TokenType) -> Array[Expr] raise SqlglotError

    Parses a comma (or sep) separated list.

    Parser::parse_csv_any

    fn[T] Parser::parse_csv_any(self : Parser, parse_method : () -> T? raise SqlglotError, sep? : TokenType) -> Array[T] raise SqlglotError

    _parse_csv for methods that don't return expressions.

    Parser::parse_cte

    fn Parser::parse_cte(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_cte_base

    fn Parser::parse_cte_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_cube_or_rollup

    fn Parser::parse_cube_or_rollup(self : Parser, with_prefix? : Bool) -> Expr? raise SqlglotError

    Parser::parse_data_deletion_property

    fn Parser::parse_data_deletion_property(self : Parser) -> Expr raise SqlglotError

    Parser::parse_datablocksize

    fn Parser::parse_datablocksize(self : Parser, default? : Bool, minimum? : Bool, maximum? : Bool) -> Expr raise SqlglotError

    Parser::parse_dcolon

    fn Parser::parse_dcolon(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_ddl_select

    fn Parser::parse_ddl_select(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_declare

    fn Parser::parse_declare(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_declareitem

    fn Parser::parse_declareitem(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_decode

    fn Parser::parse_decode(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_definer

    fn Parser::parse_definer(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_definer_base

    fn Parser::parse_definer_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_delete

    fn Parser::parse_delete(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_derived_table_values

    fn Parser::parse_derived_table_values(self : Parser, allow_value_synonym? : Bool) -> Expr? raise SqlglotError

    Parser::parse_describe

    fn Parser::parse_describe(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_describe_base

    fn Parser::parse_describe_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_dict_property

    fn Parser::parse_dict_property(self : Parser, this : String) -> Expr? raise SqlglotError

    Parser::parse_dict_range

    fn Parser::parse_dict_range(self : Parser, this : String) -> Expr? raise SqlglotError

    Parser::parse_disjunction

    fn Parser::parse_disjunction(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_distinct_arg_function

    fn Parser::parse_distinct_arg_function(self : Parser, kind : Kind, distinct_index? : Int) -> Expr? raise SqlglotError

    Parser::parse_distkey

    fn Parser::parse_distkey(self : Parser) -> Expr raise SqlglotError

    Parser::parse_distributed_property

    fn Parser::parse_distributed_property(self : Parser) -> Expr raise SqlglotError

    Parser::parse_drop

    fn Parser::parse_drop(self : Parser, exists? : Bool) -> Expr? raise SqlglotError

    Parser::parse_drop_column

    fn Parser::parse_drop_column(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_drop_column_base

    fn Parser::parse_drop_column_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_drop_partition

    fn Parser::parse_drop_partition(self : Parser, exists? : Bool?) -> Expr? raise SqlglotError

    Parser::parse_equality

    fn Parser::parse_equality(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_escape

    fn Parser::parse_escape(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_exists

    fn Parser::parse_exists(self : Parser, not_? : Bool) -> Bool? raise SqlglotError

    IF [NOT] EXISTS. Returns None when IF isn't matched (Python None).

    Parser::parse_exponent

    fn Parser::parse_exponent(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_expression

    fn Parser::parse_expression(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_expressions

    fn Parser::parse_expressions(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_extract

    fn Parser::parse_extract(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_extract_base

    fn Parser::parse_extract_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_factor

    fn Parser::parse_factor(self : Parser, parse_mod? : Bool) -> Expr? raise SqlglotError

    Parser::parse_factor_operand

    fn Parser::parse_factor_operand(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_fallback

    fn Parser::parse_fallback(self : Parser, no? : Bool) -> Expr raise SqlglotError

    Parser::parse_field

    fn Parser::parse_field(self : Parser, any_token? : Bool, tokens? : TokenSet, anonymous_func? : Bool) -> Expr? raise SqlglotError

    Parser::parse_field_def

    fn Parser::parse_field_def(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_file_location

    fn Parser::parse_file_location(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_foreign_key

    fn Parser::parse_foreign_key(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_foreign_key_base

    fn Parser::parse_foreign_key_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_format_json

    fn Parser::parse_format_json(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_format_name

    fn Parser::parse_format_name(self : Parser) -> Expr raise SqlglotError

    Parser::parse_freespace

    fn Parser::parse_freespace(self : Parser) -> Expr raise SqlglotError

    Parser::parse_from

    fn Parser::parse_from(self : Parser, joins? : Bool, skip_from_token? : Bool, consume_pipe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_from_base

    fn Parser::parse_from_base(self : Parser, joins? : Bool, skip_from_token? : Bool, consume_pipe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_function

    fn Parser::parse_function(self : Parser, functions? : Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError], anonymous? : Bool, optional_parens? : Bool, any_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_function_args

    fn Parser::parse_function_args(self : Parser, alias? : Bool) -> Array[Expr] raise SqlglotError

    Parser::parse_function_base

    fn Parser::parse_function_base(self : Parser, functions? : Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError], anonymous? : Bool, optional_parens? : Bool, any_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_function_call

    fn Parser::parse_function_call(self : Parser, functions? : Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError], anonymous? : Bool, optional_parens? : Bool, any_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_function_call_base

    fn Parser::parse_function_call_base(self : Parser, functions? : Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError], anonymous? : Bool, optional_parens? : Bool, any_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_function_parameter

    fn Parser::parse_function_parameter(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_function_properties

    fn Parser::parse_function_properties(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_function_properties_base

    fn Parser::parse_function_properties_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_gap_fill

    fn Parser::parse_gap_fill(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_generated_as_identity

    fn Parser::parse_generated_as_identity(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_generated_as_identity_base

    fn Parser::parse_generated_as_identity_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_grant

    fn Parser::parse_grant(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_grant_principal

    fn Parser::parse_grant_principal(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_grant_privilege

    fn Parser::parse_grant_privilege(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_grant_revoke_common

    fn Parser::parse_grant_revoke_common(self : Parser) -> (Array[Expr], String?, Expr?) raise SqlglotError

    Parser::parse_group

    fn Parser::parse_group(self : Parser, skip_group_by_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_group_concat

    fn Parser::parse_group_concat(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_group_concat_base

    fn Parser::parse_group_concat_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_grouping_set

    fn Parser::parse_grouping_set(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_grouping_sets

    fn Parser::parse_grouping_sets(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_having

    fn Parser::parse_having(self : Parser, skip_having_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_having_max

    fn Parser::parse_having_max(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_heredoc

    fn Parser::parse_heredoc(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_hint

    fn Parser::parse_hint(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_hint_body

    fn Parser::parse_hint_body(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_hint_fallback_to_string

    fn Parser::parse_hint_fallback_to_string(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_hint_function_call

    fn Parser::parse_hint_function_call(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_historical_data

    fn Parser::parse_historical_data(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_id_var

    fn Parser::parse_id_var(self : Parser, any_token? : Bool, tokens? : TokenSet) -> Expr? raise SqlglotError

    Parser::parse_id_var_base

    fn Parser::parse_id_var_base(self : Parser, any_token? : Bool, tokens? : TokenSet) -> Expr? raise SqlglotError

    Parser::parse_identifier

    fn Parser::parse_identifier(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_if

    fn Parser::parse_if(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_if_base

    fn Parser::parse_if_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_in

    fn Parser::parse_in(self : Parser, this : Expr?, alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_index

    fn Parser::parse_index(self : Parser, index? : Expr?, anonymous? : Bool) -> Expr? raise SqlglotError

    Parser::parse_index_params

    fn Parser::parse_index_params(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_index_params_base

    fn Parser::parse_index_params_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_indexed_column

    fn Parser::parse_indexed_column(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_initcap

    fn Parser::parse_initcap(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_inline

    fn Parser::parse_inline(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_insert

    fn Parser::parse_insert(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_insert_table

    fn Parser::parse_insert_table(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_insert_table_base

    fn Parser::parse_insert_table_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_interpolate

    fn Parser::parse_interpolate(self : Parser) -> Array[Expr]? raise SqlglotError

    Parser::parse_interval

    fn Parser::parse_interval(self : Parser, require_interval? : Bool, parse_function_unit? : Bool) -> Expr? raise SqlglotError

    Parser::parse_interval_span

    fn Parser::parse_interval_span(self : Parser, this : Expr?, parse_function_unit? : Bool) -> Expr raise SqlglotError

    Parser::parse_into

    fn Parser::parse_into(self : Parser, expression_types : ArrayView[Kind], raw_tokens : Array[Token], sql? : String, into_is_list? : Bool) -> Array[Expr?] raise SqlglotError

    Parses a list of tokens into a given Expr type.

    Parser::parse_into_clause

    fn Parser::parse_into_clause(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_into_clause_base

    fn Parser::parse_into_clause_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_introducer

    fn Parser::parse_introducer(self : Parser, token : Token) -> Expr? raise SqlglotError

    Parser::parse_is

    fn Parser::parse_is(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_join

    fn Parser::parse_join(self : Parser, skip_join_token? : Bool, parse_bracket? : Bool, alias_tokens? : TokenSet) -> Expr? raise SqlglotError

    Parser::parse_join_base

    fn Parser::parse_join_base(self : Parser, skip_join_token? : Bool, parse_bracket? : Bool, alias_tokens? : TokenSet) -> Expr? raise SqlglotError

    Parser::parse_join_hint

    fn Parser::parse_join_hint(self : Parser, func_name : String) -> Expr? raise SqlglotError

    Parser::parse_join_parts

    fn Parser::parse_join_parts(self : Parser) -> (Token?, Token?, Token?) raise SqlglotError

    Parser::parse_join_parts_base

    fn Parser::parse_join_parts_base(self : Parser) -> (Token?, Token?, Token?)

    Parser::parse_joins

    fn Parser::parse_joins(self : Parser, alias_tokens? : TokenSet) -> Array[Expr] raise SqlglotError

    Parser::parse_journal

    fn Parser::parse_journal(self : Parser, kwargs : Map[String, Bool]) -> Expr raise SqlglotError

    Parser::parse_json_column_def

    fn Parser::parse_json_column_def(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_json_key_value

    fn Parser::parse_json_key_value(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_json_object

    fn Parser::parse_json_object(self : Parser, agg? : Bool) -> Expr? raise SqlglotError

    Parser::parse_json_object_base

    fn Parser::parse_json_object_base(self : Parser, agg? : Bool) -> Expr? raise SqlglotError

    Parser::parse_json_schema

    fn Parser::parse_json_schema(self : Parser) -> Expr raise SqlglotError

    Parser::parse_json_table

    fn Parser::parse_json_table(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_json_type_arg

    fn Parser::parse_json_type_arg(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_json_value

    fn Parser::parse_json_value(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_key_constraint_options

    fn Parser::parse_key_constraint_options(self : Parser) -> Array[String] raise SqlglotError

    Parser::parse_key_value_property

    fn Parser::parse_key_value_property(self : Parser, parse_value? : () -> Expr? raise SqlglotError) -> Expr? raise SqlglotError

    Parser::parse_kill

    fn Parser::parse_kill(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_lambda

    fn Parser::parse_lambda(self : Parser, alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_lambda_arg

    fn Parser::parse_lambda_arg(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_lambda_base

    fn Parser::parse_lambda_base(self : Parser, alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_lateral

    fn Parser::parse_lateral(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_lateral_base

    fn Parser::parse_lateral_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_limit

    fn Parser::parse_limit(self : Parser, this? : Expr?, top? : Bool, skip_limit_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_limit_by

    fn Parser::parse_limit_by(self : Parser) -> Array[Expr]? raise SqlglotError

    Parser::parse_limit_options

    fn Parser::parse_limit_options(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_load

    fn Parser::parse_load(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_locking

    fn Parser::parse_locking(self : Parser) -> Expr raise SqlglotError

    Parser::parse_locks

    fn Parser::parse_locks(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_log

    fn Parser::parse_log(self : Parser, no? : Bool) -> Expr raise SqlglotError

    Parser::parse_macro_overloads

    fn Parser::parse_macro_overloads(self : Parser, this : Expr, first_body : Expr, first_is_table : Bool) -> Expr? raise SqlglotError

    Parser::parse_match_against

    fn Parser::parse_match_against(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_match_recognize

    fn Parser::parse_match_recognize(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_match_recognize_measure

    fn Parser::parse_match_recognize_measure(self : Parser) -> Expr raise SqlglotError

    Parser::parse_merge

    fn Parser::parse_merge(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_mergeblockratio

    fn Parser::parse_mergeblockratio(self : Parser, no? : Bool, default? : Bool) -> Expr raise SqlglotError

    Parser::parse_modifies_property

    fn Parser::parse_modifies_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_multitable_inserts

    fn Parser::parse_multitable_inserts(self : Parser, comments : Array[String]) -> Expr raise SqlglotError

    Parser::parse_name_as_expression

    fn Parser::parse_name_as_expression(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_named_window

    fn Parser::parse_named_window(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_next_value_for

    fn Parser::parse_next_value_for(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_no_property

    fn Parser::parse_no_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_normalize

    fn Parser::parse_normalize(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_not_constraint

    fn Parser::parse_not_constraint(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_null

    fn Parser::parse_null(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_number

    fn Parser::parse_number(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_odbc_datetime_literal

    fn Parser::parse_odbc_datetime_literal(self : Parser) -> Expr raise SqlglotError

    Parser::parse_offset

    fn Parser::parse_offset(self : Parser, this? : Expr?) -> Expr? raise SqlglotError

    Parser::parse_on_condition

    fn Parser::parse_on_condition(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_on_conflict

    fn Parser::parse_on_conflict(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_on_handling

    fn Parser::parse_on_handling(self : Parser, on : String, values : Array[String]) -> Value? raise SqlglotError

    Parses "X ON Y" or "DEFAULT ON Y". Returns a string or an expression.

    Parser::parse_on_property

    fn Parser::parse_on_property(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_on_property_base

    fn Parser::parse_on_property_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_opclass

    fn Parser::parse_opclass(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_open_json

    fn Parser::parse_open_json(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_operator

    fn Parser::parse_operator(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_order

    fn Parser::parse_order(self : Parser, this? : Expr?, skip_order_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_ordered

    fn Parser::parse_ordered(self : Parser, parse_method? : () -> Expr? raise SqlglotError) -> Expr? raise SqlglotError

    Parser::parse_ordered_base

    fn Parser::parse_ordered_base(self : Parser, parse_method? : () -> Expr? raise SqlglotError) -> Expr? raise SqlglotError

    Parser::parse_overlay

    fn Parser::parse_overlay(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_parameter

    fn Parser::parse_parameter(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_paren

    fn Parser::parse_paren(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_partition

    fn Parser::parse_partition(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_partition_and_order

    fn Parser::parse_partition_and_order(self : Parser) -> (Array[Expr], Expr?) raise SqlglotError

    Parser::parse_partition_base

    fn Parser::parse_partition_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_partition_bound_spec

    fn Parser::parse_partition_bound_spec(self : Parser) -> Expr raise SqlglotError

    Parser::parse_partition_by

    fn Parser::parse_partition_by(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_partitioned_by

    fn Parser::parse_partitioned_by(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_partitioned_by_base

    fn Parser::parse_partitioned_by_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_partitioned_by_bucket_or_truncate

    fn Parser::parse_partitioned_by_bucket_or_truncate(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_partitioned_of

    fn Parser::parse_partitioned_of(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_period_for_system_time

    fn Parser::parse_period_for_system_time(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_aggregate

    fn Parser::parse_pipe_syntax_aggregate(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_aggregate_fields

    fn Parser::parse_pipe_syntax_aggregate_fields(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_aggregate_group_order_by

    fn Parser::parse_pipe_syntax_aggregate_group_order_by(self : Parser, query : Expr, group_by_exists? : Bool) -> Expr raise SqlglotError

    Parser::parse_pipe_syntax_extend

    fn Parser::parse_pipe_syntax_extend(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_join

    fn Parser::parse_pipe_syntax_join(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_limit

    fn Parser::parse_pipe_syntax_limit(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_pivot

    fn Parser::parse_pipe_syntax_pivot(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_query

    fn Parser::parse_pipe_syntax_query(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_select

    fn Parser::parse_pipe_syntax_select(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_set_operator

    fn Parser::parse_pipe_syntax_set_operator(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pipe_syntax_tablesample

    fn Parser::parse_pipe_syntax_tablesample(self : Parser, query : Expr) -> Expr? raise SqlglotError

    Parser::parse_pivot

    fn Parser::parse_pivot(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_pivot_aggregation

    fn Parser::parse_pivot_aggregation(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_pivot_aggregation_base

    fn Parser::parse_pivot_aggregation_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_pivot_in

    fn Parser::parse_pivot_in(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_pivots

    fn Parser::parse_pivots(self : Parser) -> Array[Expr]? raise SqlglotError

    Parser::parse_placeholder

    fn Parser::parse_placeholder(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_position

    fn Parser::parse_position(self : Parser, haystack_first? : Bool) -> Expr? raise SqlglotError

    Parser::parse_position_base

    fn Parser::parse_position_base(self : Parser, haystack_first? : Bool) -> Expr? raise SqlglotError

    Parser::parse_prewhere

    fn Parser::parse_prewhere(self : Parser, skip_where_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_primary

    fn Parser::parse_primary(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_primary_base

    fn Parser::parse_primary_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_primary_key

    fn Parser::parse_primary_key(self : Parser, wrapped_optional? : Bool, in_props? : Bool, named_primary_key? : Bool) -> Expr? raise SqlglotError

    Parser::parse_primary_key_base

    fn Parser::parse_primary_key_base(self : Parser, wrapped_optional? : Bool, in_props? : Bool, named_primary_key? : Bool) -> Expr? raise SqlglotError

    Parser::parse_primary_key_part

    fn Parser::parse_primary_key_part(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_primary_or_var

    fn Parser::parse_primary_or_var(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_procedure_option

    fn Parser::parse_procedure_option(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_projections

    fn Parser::parse_projections(self : Parser) -> (Array[Expr], Array[Expr]?) raise SqlglotError

    Parser::parse_properties

    fn Parser::parse_properties(self : Parser, before? : Bool) -> Expr? raise SqlglotError

    Parser::parse_property

    fn Parser::parse_property(self : Parser) -> Value? raise SqlglotError

    Parser::parse_property_assignment

    fn Parser::parse_property_assignment(self : Parser, kind : Kind, kwargs? : ArrayView[(String, &IntoValue)]) -> Expr raise SqlglotError

    Parser::parse_property_before

    fn Parser::parse_property_before(self : Parser) -> Value? raise SqlglotError

    Parser::parse_property_before_base

    fn Parser::parse_property_before_base(self : Parser) -> Value? raise SqlglotError

    Parser::parse_qualify

    fn Parser::parse_qualify(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_query_modifiers

    fn Parser::parse_query_modifiers(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_range

    fn Parser::parse_range(self : Parser, this? : Expr?) -> Expr? raise SqlglotError

    Parser::parse_range_base

    fn Parser::parse_range_base(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_reads_property

    fn Parser::parse_reads_property(self : Parser) -> Expr? raise SqlglotError

    fn Parser::parse_recursive_with_search(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_references

    fn Parser::parse_references(self : Parser, match_? : Bool) -> Expr? raise SqlglotError

    Parser::parse_refresh

    fn Parser::parse_refresh(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_remote_with_connection

    fn Parser::parse_remote_with_connection(self : Parser) -> Expr raise SqlglotError

    Parser::parse_respect_or_ignore_nulls

    fn Parser::parse_respect_or_ignore_nulls(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_retention_period

    fn Parser::parse_retention_period(self : Parser) -> Expr raise SqlglotError

    Parser::parse_returning

    fn Parser::parse_returning(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_returns

    fn Parser::parse_returns(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_returns_base

    fn Parser::parse_returns_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_revoke

    fn Parser::parse_revoke(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_row

    fn Parser::parse_row(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_row_format

    fn Parser::parse_row_format(self : Parser, match_row? : Bool) -> Expr? raise SqlglotError

    Parser::parse_schema

    fn Parser::parse_schema(self : Parser, this? : Expr?) -> Expr? raise SqlglotError

    Parser::parse_select

    fn Parser::parse_select(self : Parser, nested? : Bool, table? : Bool, parse_subquery_alias? : Bool, parse_set_operation? : Bool, consume_pipe? : Bool, from_? : Expr) -> Expr? raise SqlglotError

    Parser::parse_select_or_expression

    fn Parser::parse_select_or_expression(self : Parser, alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_select_query

    fn Parser::parse_select_query(self : Parser, nested? : Bool, table? : Bool, parse_subquery_alias? : Bool, parse_set_operation? : Bool) -> Expr? raise SqlglotError

    Parser::parse_sequence_properties

    fn Parser::parse_sequence_properties(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_serde_properties

    fn Parser::parse_serde_properties(self : Parser, with_? : Bool) -> Expr? raise SqlglotError

    Parser::parse_session_parameter

    fn Parser::parse_session_parameter(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_set

    fn Parser::parse_set(self : Parser, unset? : Bool, tag? : Bool) -> Expr? raise SqlglotError

    Parser::parse_set_base

    fn Parser::parse_set_base(self : Parser, unset? : Bool, tag? : Bool) -> Expr? raise SqlglotError

    Parser::parse_set_item

    fn Parser::parse_set_item(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_set_item_assignment

    fn Parser::parse_set_item_assignment(self : Parser, kind? : String) -> Expr? raise SqlglotError

    Parser::parse_set_operation

    fn Parser::parse_set_operation(self : Parser, this : Expr?, consume_pipe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_set_operations

    fn Parser::parse_set_operations(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_set_transaction

    fn Parser::parse_set_transaction(self : Parser, global_? : Bool) -> Expr raise SqlglotError

    Parser::parse_settings_property

    fn Parser::parse_settings_property(self : Parser) -> Expr raise SqlglotError

    Parser::parse_show

    fn Parser::parse_show(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_simplified_pivot

    fn Parser::parse_simplified_pivot(self : Parser, is_unpivot? : Bool) -> Expr? raise SqlglotError

    Parser::parse_slice

    fn Parser::parse_slice(self : Parser, this : Expr?) -> Expr? raise SqlglotError

    Parser::parse_sort

    fn Parser::parse_sort(self : Parser, kind : Kind, token : TokenType) -> Expr? raise SqlglotError

    Parser::parse_sortkey

    fn Parser::parse_sortkey(self : Parser, compound? : Bool) -> Expr raise SqlglotError

    Parser::parse_sql_security

    fn Parser::parse_sql_security(self : Parser) -> Expr raise SqlglotError

    Parser::parse_star

    fn Parser::parse_star(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_star_op

    fn Parser::parse_star_op(self : Parser, keywords : ArrayView[String]) -> Array[Expr]? raise SqlglotError

    Parser::parse_star_ops

    fn Parser::parse_star_ops(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_statement

    fn Parser::parse_statement(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_statement_base

    fn Parser::parse_statement_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_stored

    fn Parser::parse_stored(self : Parser) -> Expr raise SqlglotError

    Parser::parse_stream

    fn Parser::parse_stream(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_string

    fn Parser::parse_string(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_string_agg

    fn Parser::parse_string_agg(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_string_as_identifier

    fn Parser::parse_string_as_identifier(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_struct_types

    fn Parser::parse_struct_types(self : Parser, type_required? : Bool) -> Expr? raise SqlglotError

    Parser::parse_struct_types_base

    fn Parser::parse_struct_types_base(self : Parser, type_required? : Bool) -> Expr? raise SqlglotError

    Parser::parse_subquery

    fn Parser::parse_subquery(self : Parser, this : Expr?, parse_alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_substring

    fn Parser::parse_substring(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_substring_base

    fn Parser::parse_substring_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_system_versioning_property

    fn Parser::parse_system_versioning_property(self : Parser, with_? : Bool) -> Expr raise SqlglotError

    Parser::parse_table

    fn Parser::parse_table(self : Parser, schema? : Bool, joins? : Bool, alias_tokens? : TokenSet, parse_bracket? : Bool, is_db_reference? : Bool, parse_partition? : Bool, consume_pipe? : Bool) -> Expr? raise SqlglotError

    Parser::parse_table_alias

    fn Parser::parse_table_alias(self : Parser, alias_tokens? : TokenSet) -> Expr? raise SqlglotError

    Parser::parse_table_base

    fn Parser::parse_table_base(self : Parser, args : TableArgs) -> Expr? raise SqlglotError

    Parser::parse_table_hints

    fn Parser::parse_table_hints(self : Parser) -> Array[Expr]? raise SqlglotError

    Parser::parse_table_hints_base

    fn Parser::parse_table_hints_base(self : Parser) -> Array[Expr]? raise SqlglotError

    Parser::parse_table_part

    fn Parser::parse_table_part(self : Parser, schema? : Bool) -> Expr? raise SqlglotError

    Parser::parse_table_part_base

    fn Parser::parse_table_part_base(self : Parser, schema? : Bool) -> Expr? raise SqlglotError

    Parser::parse_table_parts

    fn Parser::parse_table_parts(self : Parser, schema? : Bool, is_db_reference? : Bool, wildcard? : Bool, fast? : Bool) -> Expr? raise SqlglotError

    Parser::parse_table_parts_base

    fn Parser::parse_table_parts_base(self : Parser, schema? : Bool, is_db_reference? : Bool, wildcard? : Bool, fast? : Bool) -> Expr? raise SqlglotError

    Parser::parse_table_parts_fast

    fn Parser::parse_table_parts_fast(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_table_sample

    fn Parser::parse_table_sample(self : Parser, as_modifier? : Bool) -> Expr? raise SqlglotError

    Parser::parse_table_sample_base

    fn Parser::parse_table_sample_base(self : Parser, as_modifier? : Bool) -> Expr? raise SqlglotError

    Parser::parse_term

    fn Parser::parse_term(self : Parser, parse_mod? : Bool) -> Expr? raise SqlglotError

    Parser::parse_to_table

    fn Parser::parse_to_table(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_tokens_with

    fn Parser::parse_tokens_with(self : Parser, parse_method : (Parser) -> Expr? raise SqlglotError, raw_tokens : Array[Token], sql : String) -> Array[Expr?] raise SqlglotError

    Parser::parse_transaction

    fn Parser::parse_transaction(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_transaction_base

    fn Parser::parse_transaction_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_trigger_deferrable

    fn Parser::parse_trigger_deferrable(self : Parser) -> (String?, String?) raise SqlglotError

    Parser::parse_trigger_events

    fn Parser::parse_trigger_events(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_trigger_execute

    fn Parser::parse_trigger_execute(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_trigger_for_each

    fn Parser::parse_trigger_for_each(self : Parser) -> String? raise SqlglotError

    Parser::parse_trigger_referencing

    fn Parser::parse_trigger_referencing(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_trigger_referencing_clause

    fn Parser::parse_trigger_referencing_clause(self : Parser, keyword : String) -> Expr? raise SqlglotError

    Parser::parse_trim

    fn Parser::parse_trim(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_truncate_table

    fn Parser::parse_truncate_table(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_ttl

    fn Parser::parse_ttl(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_type

    fn Parser::parse_type(self : Parser, parse_interval? : Bool, fallback_to_identifier? : Bool) -> Expr? raise SqlglotError

    Parser::parse_type_base

    fn Parser::parse_type_base(self : Parser, parse_interval? : Bool, fallback_to_identifier? : Bool) -> Expr? raise SqlglotError

    Parser::parse_type_size

    fn Parser::parse_type_size(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_types

    fn Parser::parse_types(self : Parser, check_func? : Bool, schema? : Bool, allow_identifiers? : Bool, with_collation? : Bool) -> Expr? raise SqlglotError

    Parser::parse_types_base

    fn Parser::parse_types_base(self : Parser, check_func? : Bool, schema? : Bool, allow_identifiers? : Bool, with_collation? : Bool) -> Expr? raise SqlglotError

    Parser::parse_unary

    fn Parser::parse_unary(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_uncache

    fn Parser::parse_uncache(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_unique

    fn Parser::parse_unique(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_unique_base

    fn Parser::parse_unique_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_unique_key

    fn Parser::parse_unique_key(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_unique_key_base

    fn Parser::parse_unique_key_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_unnamed_constraint

    fn Parser::parse_unnamed_constraint(self : Parser, constraints? :
    Set
    [String]) -> Expr? raise SqlglotError

    Parser::parse_unnamed_constraints

    fn Parser::parse_unnamed_constraints(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_unnest

    fn Parser::parse_unnest(self : Parser, with_alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_unnest_base

    fn Parser::parse_unnest_base(self : Parser, with_alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_unpivot_columns

    fn Parser::parse_unpivot_columns(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_unquoted_field

    fn Parser::parse_unquoted_field(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_update

    fn Parser::parse_update(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_update_assignment

    fn Parser::parse_update_assignment(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_update_base

    fn Parser::parse_update_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_use

    fn Parser::parse_use(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_use_base

    fn Parser::parse_use_base(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_user_defined_function

    fn Parser::parse_user_defined_function(self : Parser, kind? : TokenType) -> Expr? raise SqlglotError

    Parser::parse_user_defined_function_base

    fn Parser::parse_user_defined_function_base(self : Parser, kind? : TokenType) -> Expr? raise SqlglotError

    Parser::parse_user_defined_function_expression

    fn Parser::parse_user_defined_function_expression(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_user_defined_type

    fn Parser::parse_user_defined_type(self : Parser, identifier : Expr) -> Expr? raise SqlglotError

    Parser::parse_user_defined_type_base

    fn Parser::parse_user_defined_type_base(self : Parser, identifier : Expr) -> Expr? raise SqlglotError

    Parser::parse_using_identifiers

    fn Parser::parse_using_identifiers(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_value

    fn Parser::parse_value(self : Parser, values? : Bool) -> Expr? raise SqlglotError

    Parser::parse_value_base

    fn Parser::parse_value_base(self : Parser, values? : Bool) -> Expr? raise SqlglotError

    Parser::parse_var

    fn Parser::parse_var(self : Parser, any_token? : Bool, tokens? : TokenSet, upper? : Bool) -> Expr? raise SqlglotError

    Parser::parse_var_from_options

    fn Parser::parse_var_from_options(self : Parser, options : Map[String, Array[Array[String]]], raise_unmatched? : Bool) -> Expr? raise SqlglotError

    Parser::parse_var_or_string

    fn Parser::parse_var_or_string(self : Parser, upper? : Bool) -> Expr? raise SqlglotError

    Parser::parse_vector_expressions

    fn Parser::parse_vector_expressions(self : Parser, expressions : Array[Expr]) -> Array[Expr] raise SqlglotError

    Parser::parse_version

    fn Parser::parse_version(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_volatile_property

    fn Parser::parse_volatile_property(self : Parser) -> Expr raise SqlglotError

    Parser::parse_when_matched

    fn Parser::parse_when_matched(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_where

    fn Parser::parse_where(self : Parser, skip_where_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_whileblock

    fn Parser::parse_whileblock(self : Parser) -> Expr raise SqlglotError

    Parser::parse_window

    fn Parser::parse_window(self : Parser, this : Expr?, alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_window_base

    fn Parser::parse_window_base(self : Parser, this : Expr?, alias? : Bool) -> Expr? raise SqlglotError

    Parser::parse_window_clause

    fn Parser::parse_window_clause(self : Parser) -> Array[Expr]? raise SqlglotError

    Parser::parse_window_spec

    fn Parser::parse_window_spec(self : Parser) -> (Value?, String?) raise SqlglotError

    Returns (value, side).

    Parser::parse_with

    fn Parser::parse_with(self : Parser, skip_with_token? : Bool) -> Expr? raise SqlglotError

    Parser::parse_with_operator

    fn Parser::parse_with_operator(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_with_property

    fn Parser::parse_with_property(self : Parser) -> Value? raise SqlglotError

    Parser::parse_with_property_base

    fn Parser::parse_with_property_base(self : Parser) -> Value? raise SqlglotError

    Parser::parse_withdata

    fn Parser::parse_withdata(self : Parser, no? : Bool) -> Expr raise SqlglotError

    Parser::parse_withisolatedloading

    fn Parser::parse_withisolatedloading(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_withjournaltable

    fn Parser::parse_withjournaltable(self : Parser) -> Expr raise SqlglotError

    Parser::parse_wrapped

    fn[T] Parser::parse_wrapped(self : Parser, parse_method : () -> T raise SqlglotError, optional? : Bool) -> T raise SqlglotError

    Parser::parse_wrapped_csv

    fn Parser::parse_wrapped_csv(self : Parser, parse_method : () -> Expr? raise SqlglotError, sep? : TokenType, optional? : Bool) -> Array[Expr] raise SqlglotError

    Parser::parse_wrapped_id_vars

    fn Parser::parse_wrapped_id_vars(self : Parser, optional? : Bool) -> Array[Expr] raise SqlglotError

    Parser::parse_wrapped_options

    fn Parser::parse_wrapped_options(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_wrapped_properties

    fn Parser::parse_wrapped_properties(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_wrapped_select

    fn Parser::parse_wrapped_select(self : Parser, table? : Bool) -> Expr? raise SqlglotError

    Parser::parse_wrapped_select_base

    fn Parser::parse_wrapped_select_base(self : Parser, table? : Bool) -> Expr? raise SqlglotError

    Parser::parse_xml_element

    fn Parser::parse_xml_element(self : Parser) -> Expr? raise SqlglotError

    Parser::parse_xml_namespace

    fn Parser::parse_xml_namespace(self : Parser) -> Array[Expr] raise SqlglotError

    Parser::parse_xml_table

    fn Parser::parse_xml_table(self : Parser) -> Expr? raise SqlglotError

    Parser::pivot_column_names

    fn Parser::pivot_column_names(self : Parser, aggregations : Array[Expr]) -> Array[String] raise SqlglotError

    Parser::prev_upper

    fn Parser::prev_upper(self : Parser) -> String

    Parser::raise_error

    fn Parser::raise_error(self : Parser, message : String, token? : Token) -> Unit raise SqlglotError

    Appends an error in the list of recorded errors or raises it, depending on the chosen error level setting.

    Parser::replace_lambda

    fn Parser::replace_lambda(self : Parser, node : Expr?, expressions : Array[Expr]) -> Expr? raise SqlglotError

    Parser::reset

    fn Parser::reset(self : Parser) -> Unit

    Parser::retreat

    fn Parser::retreat(self : Parser, index : Int) -> Unit

    Parser::sql_slice

    fn Parser::sql_slice(self : Parser, start : Int, end : Int) -> String

    self.sql[start:end] (code point indices, Python slicing) in O(end - start): the code point -> UTF-16 offset table is built once per SQL string, instead of converting the whole string on every call.

    Parser::to_prop_eq

    fn Parser::to_prop_eq(self : Parser, expression : Expr, index : Int) -> Expr raise SqlglotError

    Parser::try_parse

    fn[T] Parser::try_parse(self : Parser, parse_method : () -> T? raise SqlglotError, retreat? : Bool) -> T?

    Attempts to backtrack if a parse function that contains a try/catch internally raises an error.

    Parser::validate_expression

    fn Parser::validate_expression(self : Parser, expression : Expr, nargs? : Int) -> Expr raise SqlglotError

    Validates an Expr, making sure that all its mandatory arguments are set.

    Parser::values_to_select

    fn Parser::values_to_select(self : Parser, values : Expr) -> Expr

    Parser::warn_unsupported

    fn Parser::warn_unsupported(self : Parser) -> Unit

    ParserConfig

    pub(all) struct ParserConfig {
    add_constraint_tokens : TokenSet
    add_join_on_true : Bool
    adjacent_strings_cannot_be_connected : Bool
    aggregate_type_tokens : TokenSet
    alias_tokens : TokenSet
    alterables : TokenSet
    alter_rename_requires_column : Bool
    alter_table_partitions : Bool
    ambiguous_alias_tokens : Array[TokenType]
    analyze_styles :
    Set
    [String]
    array_constructors : Map[String, Kind]
    assignment : Map[TokenType, Kind]
    bitwise : Map[TokenType, Kind]
    brackets : TokenSet
    cast_actions : Map[String, Array[Array[String]]]
    cast_column_operators : TokenSet
    clone_keywords :
    Set
    [String]
    colon_chain_is_single_extract : Bool
    colon_is_variant_extract : Bool
    colon_placeholder_tokens : TokenSet
    column_postfix_tokens : TokenSet
    comment_table_alias_tokens : TokenSet
    comparison : Map[TokenType, Kind]
    conflict_actions : Map[String, Array[Array[String]]]
    conjunction : Map[TokenType, Kind]
    copy_into_varlen_options :
    Set
    [String]
    creatables : TokenSet
    create_sequence : Map[String, Array[Array[String]]]
    db_creatables : TokenSet
    ddl_select_tokens : TokenSet
    default_sampling_method : String?
    describe_styles :
    Set
    [String]
    disjunction : Map[TokenType, Kind]
    distinct_tokens : TokenSet
    enum_type_tokens : TokenSet
    equality : Map[TokenType, Kind]
    execute_as_options : Map[String, Array[Array[String]]]
    exponent : Map[TokenType, Kind]
    factor : Map[TokenType, Kind]
    fetch_tokens : TokenSet
    functions_with_aliased_args :
    Set
    [String]
    func_tokens : TokenSet
    historical_data_kind :
    Set
    [String]
    historical_data_prefix :
    Set
    [String]
    identifier_tokens : TokenSet
    identify_pivot_strings : Bool
    id_var_tokens : TokenSet
    insert_alternatives :
    Set
    [String]
    interval_spans : Bool
    invalid_func_name_tokens : TokenSet
    isolated_loading_options : Map[String, Array[Array[String]]]
    is_json_predicate_kind :
    Set
    [String]
    joins_have_equal_precedence : Bool
    join_hints :
    Set
    [String]
    join_kinds : TokenSet
    join_methods : TokenSet
    join_sides : TokenSet
    json_arrows_require_json_type : Bool
    json_extract_requires_json_expression : Bool
    json_key_value_separator_tokens : TokenSet
    key_constraint_options : Map[String, Array[Array[String]]]
    key_value_definitions : Array[Kind]
    lambda_arg_terminators : TokenSet
    log_defaults_to_ln : Bool
    map_keys_are_arbitrary_expressions : Bool
    modifiables : Array[Kind]
    modifiers_attached_to_set_op : Bool
    nested_type_tokens : TokenSet
    no_paren_functions : Map[TokenType, Kind]
    no_paren_if_commands : Bool
    odbc_datetime_literals : Map[String, Kind]
    on_condition_tokens :
    Set
    [String]
    opclass_follow_keywords :
    Set
    [String]
    operation_modifiers :
    Set
    [String]
    optional_alias_token_cte : Bool
    optype_follow_tokens : TokenSet
    partition_keywords :
    Set
    [String]
    pivot_column_naming : String
    prefixed_pivot_columns : Bool
    pre_volatile_tokens : TokenSet
    privilege_follow_tokens : TokenSet
    procedure_options : Map[String, Array[Array[String]]]
    query_modifier_tokens : TokenSet
    quoted_types_to_preserve :
    Set
    [String]
    recursive_cte_search_kind :
    Set
    [String]
    reserved_tokens : TokenSet
    schema_binding_options : Map[String, Array[Array[String]]]
    schema_unnamed_constraints :
    Set
    [String]
    security_property_keywords :
    Set
    [String]
    select_start_tokens : TokenSet
    set_assignment_delimiters :
    Set
    [String]
    set_operations : TokenSet
    set_op_modifiers :
    Set
    [String]
    set_requires_assignment_delimiter : Bool
    signed_to_unsigned_type_token : Map[TokenType, TokenType]
    strict_cast : Bool
    string_aliases : Bool
    struct_type_tokens : TokenSet
    subquery_predicates : Map[TokenType, Kind]
    subquery_tokens : TokenSet
    supports_digit_prefixed_field_names : Bool
    supports_implicit_unnest : Bool
    supports_nth_value_from_modifier : Bool
    supports_omitted_interval_span_unit : Bool
    supports_partition_selection : Bool
    tablesample_csv : Bool
    table_alias_tokens : TokenSet
    table_index_hint_tokens : TokenSet
    table_postfix_tokens : TokenSet
    table_terminators : TokenSet
    term : Map[TokenType, Kind]
    text_match_excluded_tokens : TokenSet
    times : TokenSet
    timestamps : TokenSet
    transaction_characteristics : Map[String, Array[Array[String]]]
    transaction_kind :
    Set
    [String]
    trigger_deferrable : Map[String, Array[Array[String]]]
    trigger_events : TokenSet
    trigger_timing : Map[String, Array[Array[String]]]
    trim_pattern_first : Bool
    trim_types :
    Set
    [String]
    typed_lambda_args : Bool
    type_tokens : TokenSet
    unnest_offset_alias_tokens : TokenSet
    unpivot_value_columns_first : Bool
    update_alias_tokens : TokenSet
    usables : Map[String, Array[Array[String]]]
    values_followed_by_paren : Bool
    version_phrases : Array[(Array[String], String)]
    view_attributes :
    Set
    [String]
    window_alias_tokens : TokenSet
    window_before_paren_tokens : TokenSet
    window_exclude_options : Map[String, Array[Array[String]]]
    window_sides :
    Set
    [String]
    wrapped_transform_column_constraint : Bool
    zone_aware_timestamp_constructor : Bool
    }

    Data attributes of the Python Parser class.

    ParserConfig::copy

    ParserFns

    pub(all) struct ParserFns {
    functions : Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError]
    function_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    no_paren_function_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    statement_parsers : Map[TokenType, (Parser) -> Expr? raise SqlglotError]
    unary_parsers : Map[TokenType, (Parser) -> Expr? raise SqlglotError]
    string_parsers : Map[TokenType, (Parser, Token) -> Expr? raise SqlglotError]
    numeric_parsers : Map[TokenType, (Parser, Token) -> Expr? raise SqlglotError]
    primary_parsers : Map[TokenType, (Parser, Token) -> Expr? raise SqlglotError]
    placeholder_parsers : Map[TokenType, (Parser) -> Expr? raise SqlglotError]
    range_parsers : Map[TokenType, (Parser, Expr?) -> Expr? raise SqlglotError]
    column_operators : Map[TokenType, (Parser, Expr?, Expr?) -> Expr? raise SqlglotError?]
    json_operators : Map[TokenType, (Parser, Expr?, Expr?) -> Expr? raise SqlglotError]
    lambdas : Map[TokenType, (Parser, Array[Expr]) -> Expr? raise SqlglotError]
    expression_parsers : Map[Kind, (Parser) -> Expr? raise SqlglotError]
    property_parsers : Map[String, (Parser, Map[String, Bool]) -> Value? raise SqlglotError]
    constraint_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    alter_parsers : Map[String, (Parser) -> Value? raise SqlglotError]
    alter_alter_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    query_modifier_parsers : Map[TokenType, (Parser) -> (String, Value?) raise SqlglotError]
    set_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    show_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    type_literal_parsers : Map[DType, (Parser, Expr, Expr) -> Expr raise SqlglotError]
    type_converters : Map[DType, (Expr) -> Expr]
    pipe_syntax_transform_parsers : Map[String, (Parser, Expr) -> Expr? raise SqlglotError]
    analyze_expression_parsers : Map[String, (Parser) -> Expr? raise SqlglotError]
    hooks : ParserHooks
    show_trie : WordTrie
    set_trie : WordTrie
    }

    ParserFns::copy

    fn ParserFns::copy(self : ParserFns) -> ParserFns

    ParserFns::finalize

    fn ParserFns::finalize(self : ParserFns) -> Unit

    Recomputes SHOW_TRIE / SET_TRIE.

    ParserHooks

    pub(all) struct ParserHooks {
    negate_range : (Parser, Expr?) -> Expr? raise SqlglotError?
    parse_alias : (Parser, Expr?, Bool) -> Expr? raise SqlglotError?
    parse_alter_drop_action : (Parser) -> Expr? raise SqlglotError?
    parse_alter_table_alter : (Parser) -> Expr? raise SqlglotError?
    parse_alter_table_rename : (Parser) -> Expr? raise SqlglotError?
    parse_alter_table_set : (Parser) -> Expr? raise SqlglotError?
    parse_assignment : (Parser) -> Expr? raise SqlglotError?
    parse_bracket : (Parser, Expr?) -> Expr? raise SqlglotError?
    parse_bracket_key_value : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_charset_name : (Parser) -> Expr? raise SqlglotError?
    parse_check_constraint : (Parser) -> Expr? raise SqlglotError?
    parse_cluster_property : (Parser) -> Expr? raise SqlglotError?
    parse_column : (Parser) -> Expr? raise SqlglotError?
    parse_column_constraint : (Parser) -> Expr? raise SqlglotError?
    parse_column_def : (Parser, Expr?, Bool) -> Expr? raise SqlglotError?
    parse_column_ops : (Parser, Expr?) -> Expr? raise SqlglotError?
    parse_commit_or_rollback : (Parser) -> Expr? raise SqlglotError?
    parse_connect_with_prior : (Parser) -> Expr? raise SqlglotError?
    parse_constraint : (Parser) -> Expr? raise SqlglotError?
    parse_convert : (Parser, Bool, Bool?) -> Expr? raise SqlglotError?
    parse_create : (Parser) -> Expr? raise SqlglotError?
    parse_cte : (Parser) -> Expr? raise SqlglotError?
    parse_dcolon : (Parser) -> Expr? raise SqlglotError?
    parse_definer : (Parser) -> Expr? raise SqlglotError?
    parse_describe : (Parser) -> Expr? raise SqlglotError?
    parse_drop_column : (Parser) -> Expr? raise SqlglotError?
    parse_equality : (Parser) -> Expr? raise SqlglotError?
    parse_expression : (Parser) -> Expr? raise SqlglotError?
    parse_extract : (Parser) -> Expr? raise SqlglotError?
    parse_factor_operand : (Parser) -> Expr? raise SqlglotError?
    parse_file_location : (Parser) -> Expr? raise SqlglotError?
    parse_foreign_key : (Parser) -> Expr? raise SqlglotError?
    parse_from : (Parser, Bool, Bool, Bool) -> Expr? raise SqlglotError?
    parse_function : (Parser, Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError]?, Bool, Bool, Bool) -> Expr? raise SqlglotError?
    parse_function_call : (Parser, Map[String, (Array[Expr], Parser) -> Expr raise SqlglotError]?, Bool, Bool, Bool) -> Expr? raise SqlglotError?
    parse_function_parameter : (Parser) -> Expr? raise SqlglotError?
    parse_function_properties : (Parser) -> Expr? raise SqlglotError?
    parse_generated_as_identity : (Parser) -> Expr? raise SqlglotError?
    parse_group_concat : (Parser) -> Expr? raise SqlglotError?
    parse_hint_function_call : (Parser) -> Expr? raise SqlglotError?
    parse_id_var : (Parser, Bool, TokenSet?) -> Expr? raise SqlglotError?
    parse_if : (Parser) -> Expr? raise SqlglotError?
    parse_index_params : (Parser) -> Expr? raise SqlglotError?
    parse_insert_table : (Parser) -> Expr? raise SqlglotError?
    parse_into_clause : (Parser) -> Expr? raise SqlglotError?
    parse_join : (Parser, Bool, Bool, TokenSet?) -> Expr? raise SqlglotError?
    parse_join_parts : (Parser) -> (Token?, Token?, Token?) raise SqlglotError?
    parse_json_object : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_lambda : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_lambda_arg : (Parser) -> Expr? raise SqlglotError?
    parse_lateral : (Parser) -> Expr? raise SqlglotError?
    parse_on_property : (Parser) -> Expr? raise SqlglotError?
    parse_ordered : (Parser, () -> Expr? raise SqlglotError?) -> Expr? raise SqlglotError?
    parse_parameter : (Parser) -> Expr? raise SqlglotError?
    parse_partition : (Parser) -> Expr? raise SqlglotError?
    parse_partition_and_order : (Parser) -> (Array[Expr], Expr?) raise SqlglotError?
    parse_partitioned_by : (Parser) -> Expr? raise SqlglotError?
    parse_pivot_aggregation : (Parser) -> Expr? raise SqlglotError?
    parse_position : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_primary : (Parser) -> Expr? raise SqlglotError?
    parse_primary_key : (Parser, Bool, Bool, Bool) -> Expr? raise SqlglotError?
    parse_primary_key_part : (Parser) -> Expr? raise SqlglotError?
    parse_projections : (Parser) -> (Array[Expr], Array[Expr]?) raise SqlglotError?
    parse_property_before : (Parser) -> Value? raise SqlglotError?
    parse_range : (Parser, Expr?) -> Expr? raise SqlglotError?
    parse_returns : (Parser) -> Expr? raise SqlglotError?
    parse_set : (Parser, Bool, Bool) -> Expr? raise SqlglotError?
    parse_statement : (Parser) -> Expr? raise SqlglotError?
    parse_struct_types : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_substring : (Parser) -> Expr? raise SqlglotError?
    parse_table : (Parser, TableArgs) -> Expr? raise SqlglotError?
    parse_table_hints : (Parser) -> Array[Expr]? raise SqlglotError?
    parse_table_part : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_table_parts : (Parser, Bool, Bool, Bool, Bool) -> Expr? raise SqlglotError?
    parse_table_sample : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_transaction : (Parser) -> Expr? raise SqlglotError?
    parse_type : (Parser, Bool, Bool) -> Expr? raise SqlglotError?
    parse_types : (Parser, Bool, Bool, Bool, Bool) -> Expr? raise SqlglotError?
    parse_unique : (Parser) -> Expr? raise SqlglotError?
    parse_unique_key : (Parser) -> Expr? raise SqlglotError?
    parse_unnest : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_update : (Parser) -> Expr? raise SqlglotError?
    parse_use : (Parser) -> Expr? raise SqlglotError?
    parse_user_defined_function : (Parser, TokenType?) -> Expr? raise SqlglotError?
    parse_user_defined_function_expression : (Parser) -> Expr? raise SqlglotError?
    parse_user_defined_type : (Parser, Expr) -> Expr? raise SqlglotError?
    parse_value : (Parser, Bool) -> Expr? raise SqlglotError?
    parse_vector_expressions : (Parser, Array[Expr]) -> Array[Expr] raise SqlglotError?
    parse_window : (Parser, Expr?, Bool) -> Expr? raise SqlglotError?
    parse_with_property : (Parser) -> Value? raise SqlglotError?
    parse_wrapped_id_vars : (Parser, Bool) -> Array[Expr] raise SqlglotError?
    parse_wrapped_select : (Parser, Bool) -> Expr? raise SqlglotError?
    pivot_column_names : (Parser, Array[Expr]) -> Array[String] raise SqlglotError?
    to_prop_eq : (Parser, Expr, Int) -> Expr raise SqlglotError?
    build_cast : (Parser, Bool, Array[(String, Value?)]) -> Expr raise SqlglotError?
    parse : (Parser, Array[Token], String) -> Array[Expr?] raise SqlglotError?
    parse_into : (Parser, Array[Kind], Array[Token], String) -> Array[Expr?] raise SqlglotError?
    }

    ParserHooks::copy

    fn ParserHooks::copy(self : ParserHooks) -> ParserHooks

    ParserHooks::new

    PropertiesLocation

    pub(all) enum PropertiesLocation {
    PostCreate
    PostName
    PostSchema
    PostWith
    PostAlias
    PostExpression
    PostIndex
    Unsupported
    } derive(Eq, Hash,
    Debug
    )

    Where a property is placed in a CREATE statement.

    PyObj

    pub(all) enum PyObj {
    PyExpr(Expr)
    PyStr(String)
    PyInt(Int64)
    PyFloat(Double)
    PyDecimal(String)
    PyBool(Bool)
    PyNone
    PyTuple(Array[PyObj])
    PyList(Array[PyObj])
    PyDict(Array[(PyObj, PyObj)])
    PyBytes(Bytes)
    PyObject(Array[(String, PyObj)])
    PyDate(year~ : Int, month~ : Int, day~ : Int)
    PyTime(hour~ : Int, minute~ : Int, second~ : Int, microsecond~ : Int)
    PyDateTime(year~ : Int, month~ : Int, day~ : Int, hour~ : Int, minute~ : Int, second~ : Int, microsecond~ : Int, tz~ : (String, Int)?)
    } derive(Eq)

    A host value, mirroring the Python objects that sqlglot's builder API accepts (ExpOrStr, and the values understood by exp.convert).
    impl IntoPy for PyObj

    PyObj::py_repr

    fn PyObj::py_repr(self : PyObj) -> String

    Python repr(value) for a host value.

    PyObj::py_str

    fn PyObj::py_str(self : PyObj) -> String

    Python str(value) for a host value.

    PyObj::truthy

    fn PyObj::truthy(self : PyObj) -> Bool

    Python truthiness of a host value.

    QuoteSpec

    pub(all) enum QuoteSpec {
    Same(String)
    Pair(String, String)
    }

    A quote specification: either a symmetric delimiter or a (start, end) pair.

    StrOrBool

    pub(all) enum StrOrBool {
    S(String)
    B(Bool)
    } derive(Eq,
    Debug
    )

    A Python attribute whose value is either a string or a boolean.

    TableArgs

    pub(all) struct TableArgs {
    schema : Bool
    joins : Bool
    alias_tokens : TokenSet?
    parse_bracket : Bool
    is_db_reference : Bool
    parse_partition : Bool
    consume_pipe : Bool
    }

    Keyword arguments of _parse_table.

    Token

    pub struct Token {
    token_type : TokenType
    text : String
    line : Int
    col : Int
    start : Int
    end : Int
    comments : Array[String]
    }

    A lexical token.
    impl Show for Token

    Token::identifier

    fn Token::identifier(s : String) -> Token

    Token::new

    fn Token::new(token_type : TokenType, text : String, line? : Int, col? : Int, start? : Int, end? : Int, comments? : Array[String]) -> Token

    Token::number

    fn Token::number(n : Int) -> Token

    Token::ok

    fn Token::ok(self : Token) -> Bool

    Python truthiness of a token (Token.__bool__).

    Token::string

    fn Token::string(s : String) -> Token

    Token::var_

    fn Token::var_(s : String) -> Token

    TokenSet

    pub struct TokenSet {
    bits : FixedArray[Bool]
    }

    A set of token types (Python set[TokenType]), stored as a bitmap.

    TokenSet::add

    fn TokenSet::add(self : TokenSet, t : TokenType) -> Unit

    Adds t in place.

    TokenSet::contains

    fn TokenSet::contains(self : TokenSet, t : TokenType) -> Bool

    TokenSet::copy

    fn TokenSet::copy(self : TokenSet) -> TokenSet

    TokenSet::empty

    fn TokenSet::empty() -> TokenSet

    TokenSet::minus

    fn TokenSet::minus(self : TokenSet, other : ArrayView[TokenType]) -> TokenSet

    Returns a new set: self - other.

    TokenSet::minus_set

    fn TokenSet::minus_set(self : TokenSet, other : TokenSet) -> TokenSet

    Returns a new set: self - other.

    TokenSet::new

    fn TokenSet::new(types : ArrayView[TokenType]) -> TokenSet

    TokenSet::remove

    fn TokenSet::remove(self : TokenSet, t : TokenType) -> Unit

    Removes t in place.

    TokenSet::to_array

    fn TokenSet::to_array(self : TokenSet) -> Array[TokenType]

    TokenSet::union

    fn TokenSet::union(self : TokenSet, other : ArrayView[TokenType]) -> TokenSet

    Returns a new set: self | other.

    TokenSet::union_set

    fn TokenSet::union_set(self : TokenSet, other : TokenSet) -> TokenSet

    Returns a new set: self | other.

    TokenType

    pub(all) enum TokenType {
    L_PAREN
    R_PAREN
    L_BRACKET
    R_BRACKET
    L_BRACE
    R_BRACE
    COMMA
    DOT
    DASH
    PLUS
    COLON
    DOTCOLON
    DOTCARET
    DCOLON
    DCOLONDOLLAR
    DCOLONPERCENT
    DCOLONQMARK
    DQMARK
    SEMICOLON
    STAR
    BACKSLASH
    SLASH
    LT
    LTE
    GT
    GTE
    NOT
    EQ
    NEQ
    NULLSAFE_EQ
    COLON_EQ
    COLON_GT
    NCOLON_GT
    AND
    OR
    AMP
    DPIPE
    PIPE_GT
    PIPE
    PIPE_SLASH
    DPIPE_SLASH
    CARET
    CARET_AT
    TILDE
    ARROW
    DARROW
    FARROW
    HASH
    HASH_ARROW
    DHASH_ARROW
    LR_ARROW
    LLRR_ARROW
    DAT
    AT_QMARK
    LT_AT
    AT_GT
    DOLLAR
    PARAMETER
    SESSION
    SESSION_PARAMETER
    SESSION_USER
    DAMP
    AMP_LT
    AMP_GT
    ADJACENT
    XOR
    DSTAR
    QMARK_AMP
    QMARK_PIPE
    HASH_DASH
    EXCLAMATION
    URI_START
    BLOCK_START
    BLOCK_END
    SPACE
    BREAK
    STRING
    NUMBER
    IDENTIFIER
    DATABASE
    COLUMN
    COLUMN_DEF
    SCHEMA
    TABLE
    WAREHOUSE
    STAGE
    STREAM
    STREAMLIT
    VAR
    BIT_STRING
    HEX_STRING
    BYTE_STRING
    NATIONAL_STRING
    RAW_STRING
    HEREDOC_STRING
    UNICODE_STRING
    BIT
    BOOLEAN
    TINYINT
    UTINYINT
    SMALLINT
    USMALLINT
    MEDIUMINT
    UMEDIUMINT
    INT
    UINT
    BIGINT
    UBIGINT
    BIGNUM
    INT128
    UINT128
    INT256
    UINT256
    FLOAT
    DOUBLE
    UDOUBLE
    DECIMAL
    DECIMAL32
    DECIMAL64
    DECIMAL128
    DECIMAL256
    DECFLOAT
    UDECIMAL
    BIGDECIMAL
    CHAR
    NCHAR
    VARCHAR
    NVARCHAR
    BPCHAR
    TEXT
    MEDIUMTEXT
    LONGTEXT
    BLOB
    MEDIUMBLOB
    LONGBLOB
    TINYBLOB
    TINYTEXT
    NAME
    BINARY
    VARBINARY
    JSON
    JSONB
    TIME
    TIMETZ
    TIME_NS
    TIMESTAMP
    TIMESTAMPTZ
    TIMESTAMPLTZ
    TIMESTAMPNTZ
    TIMESTAMP_S
    TIMESTAMP_MS
    TIMESTAMP_NS
    DATETIME
    DATETIME2
    DATETIME64
    SMALLDATETIME
    DATE
    DATE32
    INT4RANGE
    INT4MULTIRANGE
    INT8RANGE
    INT8MULTIRANGE
    NUMRANGE
    NUMMULTIRANGE
    TSRANGE
    TSMULTIRANGE
    TSTZRANGE
    TSTZMULTIRANGE
    DATERANGE
    DATEMULTIRANGE
    UUID
    GEOGRAPHY
    GEOGRAPHYPOINT
    NULLABLE
    GEOMETRY
    POINT
    RING
    LINESTRING
    LOCALTIME
    LOCALTIMESTAMP
    SYSTIMESTAMP
    MULTILINESTRING
    POLYGON
    MULTIPOLYGON
    HLLSKETCH
    HSTORE
    SUPER
    SERIAL
    SMALLSERIAL
    BIGSERIAL
    XML
    YEAR
    USERDEFINED
    MONEY
    SMALLMONEY
    ROWVERSION
    IMAGE
    VARIANT
    OBJECT
    INET
    IPADDRESS
    IPPREFIX
    IPV4
    IPV6
    ENUM
    ENUM8
    ENUM16
    FIXEDSTRING
    LOWCARDINALITY
    NESTED
    AGGREGATEFUNCTION
    SIMPLEAGGREGATEFUNCTION
    TDIGEST
    UNKNOWN
    VECTOR
    DYNAMIC
    VOID
    ALIAS
    ALTER
    ALL
    ANTI
    ANY
    APPLY
    ARRAY
    ASC
    ASOF
    ATTACH
    AUTO_INCREMENT
    BEGIN
    BETWEEN
    BULK_COLLECT_INTO
    CACHE
    CASE
    CHARACTER_SET
    CLUSTER_BY
    COLLATE
    COMMAND
    COMMENT
    COMMIT
    CONNECT_BY
    CONSTRAINT
    COPY
    CREATE
    CROSS
    CUBE
    CURRENT_DATE
    CURRENT_DATETIME
    CURRENT_SCHEMA
    CURRENT_TIME
    CURRENT_TIMESTAMP
    CURRENT_USER
    CURRENT_USER_ID
    CURRENT_ROLE
    CURRENT_CATALOG
    DECLARE
    DEFAULT
    DELETE
    DESC
    DESCRIBE
    DETACH
    DICTIONARY
    DISTINCT
    DISTRIBUTE_BY
    DIV
    DROP
    ELSE
    END
    ESCAPE
    EXCEPT
    EXECUTE
    EXISTS
    FALSE
    FETCH
    FILE
    FILE_FORMAT
    FILTER
    FINAL
    FIRST
    FOR
    FORCE
    FOREIGN_KEY
    FORMAT
    FROM
    FULL
    FUNCTION
    GET
    GLOB
    GLOBAL
    GRANT
    GROUP_BY
    GROUPING_SETS
    HAVING
    HINT
    IGNORE
    ILIKE
    IN
    INDEX
    INDEXED_BY
    INNER
    INSERT
    INSTALL
    INTEGRATION
    INTERSECT
    INTERVAL
    INTO
    INTRODUCER
    IRLIKE
    IS
    ISNULL
    JOIN
    JOIN_MARKER
    KEEP
    KEY
    KILL
    LANGUAGE
    LATERAL
    LEFT
    LIKE
    LIMIT
    LIST
    LOAD
    LOCK
    MAP
    MATCH
    MATCH_CONDITION
    MATCH_RECOGNIZE
    MEMBER_OF
    MERGE
    MOD
    MODEL
    NATURAL
    NEXT
    NOTHING
    NOTNULL
    NULL
    OBJECT_IDENTIFIER
    OFFSET
    ON
    ONLY
    OPERATOR
    ORDER_BY
    ORDER_SIBLINGS_BY
    ORDERED
    ORDINALITY
    OUT
    INOUT
    OUTER
    OVER
    OVERLAPS
    OVERWRITE
    PACKAGE
    PARTITION
    PARTITION_BY
    PERCENT
    PIVOT
    PLACEHOLDER
    POLICY
    POOL
    POSITIONAL
    PRAGMA
    PREWHERE
    PRIMARY_KEY
    PROCEDURE
    PROPERTIES
    PROJECTION
    PSEUDO_TYPE
    PUT
    QUALIFY
    QUOTE
    QDCOLON
    RANGE
    RECURSIVE
    REFRESH
    RENAME
    REPLACE
    RETURNING
    REVOKE
    REFERENCES
    RIGHT
    RLIKE
    ROLE
    ROLLBACK
    ROLLUP
    ROW
    ROWS
    RULE
    SELECT
    SEMI
    SEPARATOR
    SEQUENCE
    SERDE_PROPERTIES
    SET
    SETTINGS
    SHOW
    SIMILAR_TO
    SOME
    SORT_BY
    SOUNDS_LIKE
    SQL_SECURITY
    START_WITH
    STORAGE_INTEGRATION
    STRAIGHT_JOIN
    STRUCT
    SUMMARIZE
    TABLE_SAMPLE
    TAG
    TEMPORARY
    TOP
    THEN
    TRUE
    TRUNCATE
    TRIGGER
    TYPE
    UNCACHE
    UNDROP
    UNION
    UNNEST
    UNPIVOT
    UPDATE
    USE
    USING
    VALUES
    VARIADIC
    VIEW
    SEMANTIC_VIEW
    VOLATILE
    VOLUME
    WHEN
    WHERE
    WINDOW
    WITH
    UNIQUE
    UTC_DATE
    UTC_TIME
    UTC_TIMESTAMP
    OPTION
    SINK
    SOURCE
    ANALYZE
    NAMESPACE
    EXPORT
    HIVE_TOKEN_STREAM
    SENTINEL
    } derive(Compare, Eq, Hash)

    impl Show for TokenType

    TokenType::id

    fn TokenType::id(self : TokenType) -> Int

    TokenType::name

    fn TokenType::name(self : TokenType) -> String

    Tokenizer

    pub struct Tokenizer {
    settings : TokenizerSettings
    numbers_can_be_underscore_separated : Bool
    identifiers_can_start_with_digit : Bool
    unescaped_sequences : Map[String, String]
    sql : Array[Char]
    sql_str : String
    size : Int
    tokens : Array[Token]
    start : Int
    current : Int
    line : Int
    col : Int
    comments : Array[String]
    char : Char
    end : Bool
    peek : Char
    prev_token_line : Int
    }

    Tokenizer state for a single tokenize call.

    Tokenizer::new

    fn Tokenizer::new(settings : TokenizerSettings, numbers_can_be_underscore_separated? : Bool, identifiers_can_start_with_digit? : Bool, unescaped_sequences? : Map[String, String]) -> Tokenizer

    Tokenizer::tokenize

    fn Tokenizer::tokenize(self : Tokenizer, sql : String) -> Array[Token] raise SqlglotError

    Returns a list of tokens corresponding to the SQL string sql.

    TokenizerSettings

    pub(all) struct TokenizerSettings {
    single_tokens : Map[Char, TokenType]
    bit_strings : Array[QuoteSpec]
    byte_strings : Array[QuoteSpec]
    hex_strings : Array[QuoteSpec]
    raw_strings : Array[QuoteSpec]
    heredoc_strings : Array[QuoteSpec]
    unicode_strings : Array[QuoteSpec]
    identifiers : Array[QuoteSpec]
    quotes : Array[QuoteSpec]
    string_escapes : Array[String]
    byte_string_escapes : Array[String]?
    var_single_tokens : Array[Char]
    escape_follow_chars : Array[String]
    identifier_escapes : Array[String]
    heredoc_tag_is_identifier : Bool
    heredoc_string_alternative : TokenType
    string_escapes_allowed_in_raw_strings : Bool
    numeric_escapes : Map[String, NumericEscape]
    drop_unknown_escapes : Bool
    nested_comments : Bool
    hint_start : String
    tokens_preceding_hint : Array[TokenType]
    keywords : Map[String, TokenType]
    commands : Array[TokenType]
    command_prefix_tokens : Array[TokenType]
    numeric_literals : Map[String, String]
    numbers_can_have_decimals : Bool
    comments : Array[QuoteSpec]
    quotes_map : Map[String, String]
    identifiers_map : Map[String, String]
    identifier_chars : Map[Char, String]
    format_strings : Map[String, (String, TokenType)]
    string_escapes_set : Map[String, Bool]
    byte_string_escapes_set : Map[String, Bool]
    escape_follow_chars_set : Map[String, Bool]
    identifier_escapes_set : Map[String, Bool]
    comments_map : Map[String, String?]
    keyword_trie : Trie
    commands_set : Map[TokenType, Bool]
    }

    Tokenizer configuration of a dialect (the Python Tokenizer class attributes).

    TokenizerSettings::copy

    TokenizerSettings::finalize

    Computes the derived attributes (Python's __init_subclass__).

    Trie

    pub struct Trie {
    children : Map[Char, Trie]
    terminal : Bool
    }

    A character trie, mirroring sqlglot.trie.

    Trie::add

    fn Trie::add(self : Trie, key : String) -> Unit

    Trie::get

    fn Trie::get(self : Trie, c : Char) -> Trie?

    Trie::new

    fn Trie::new() -> Trie

    TrieResult

    pub(all) enum TrieResult {
    Failed
    Prefix
    Exists
    } derive(Eq,
    Debug
    )

    Value

    pub(all) enum Value {
    Node(Expr)
    List(Array[Value])
    Str(String)
    Bool(Bool)
    Int(Int64)
    DT(DType)
    }

    An argument value of an expression.
    impl IntoValue for Value
    impl SqlArg for Value

    Value::as_node

    fn Value::as_node(self : Value) -> Expr?

    Value::as_str

    fn Value::as_str(self : Value) -> String?

    Value::truthy

    fn Value::truthy(self : Value) -> Bool

    Python truthiness of an argument value.

    WordTrie

    pub struct WordTrie {
    children : Map[String, WordTrie]
    terminal : Bool
    }

    A trie keyed by words (Python new_trie(key.split(" ") for key in ...)).

    WordTrie::from_keys

    fn WordTrie::from_keys(keys : Iter[String]) -> WordTrie

    WordTrie::lookup

    fn WordTrie::lookup(self : WordTrie, key : ArrayView[String]) -> (TrieResult, WordTrie)

    Checks whether a single word continues from self.

    WordTrie::new

    fn WordTrie::new() -> WordTrie

    add_

    fn add_(a : Expr, b : Expr) -> Expr

    Python expr + other (Expr.__add__): Add with operands wrapped as needed.

    add_recursive_cte_column_names

    fn add_recursive_cte_column_names(expression : Expr) -> Expr raise SqlglotError

    Uses projection output names in recursive CTE definitions to define the CTEs' columns.

    add_within_group_for_percentiles

    fn add_within_group_for_percentiles(expression : Expr) -> Expr raise SqlglotError

    Transforms percentiles by adding a WITHIN GROUP clause to them.

    alias_

    fn alias_(e : Expr, name : String, quoted? : Bool, copy? : Bool) -> Expr

    exp.alias_(expression, name) with a string alias.

    alias_expr

    fn alias_expr(e : Expr, alias : Expr?, copy? : Bool) -> Expr

    exp.alias_(expression, alias) with an identifier alias expression.

    alias_table

    fn alias_table(e : Expr, name : String, columns? : Array[String], copy? : Bool) -> Expr

    exp.alias_(expression, name, table=True)

    all_dtypes

    let all_dtypes : FixedArray[DType]

    all_json_path_parts

    let all_json_path_parts : Array[Kind]

    Python ALL_JSON_PATH_PARTS.

    all_kinds

    let all_kinds : FixedArray[Kind]

    all_token_types

    let all_token_types : FixedArray[TokenType]

    and_

    fn and_(conditions : Array[Expr], copy? : Bool, wrap? : Bool) -> Expr

    exp.and_(...) for expressions (copied unless copy is false).

    annotate_types_hook

    let annotate_types_hook :
    Ref
    [(Expr, Dialect) -> Expr raise SqlglotError?]

    any_to_exists

    fn any_to_exists(expression : Expr) -> Expr raise SqlglotError

    Transform ANY operator to Spark's EXISTS.

    any_value_to_max_sql

    fn any_value_to_max_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python any_value_to_max_sql.

    apply_index_offset

    fn apply_index_offset(this : Expr, expressions : Array[Expr], offset : Int, dialect : Dialect) -> Array[Expr]

    exp.apply_index_offset

    apply_set_operation

    fn apply_set_operation(expressions : Array[PyObj], kind : Kind, distinct? : Bool, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Python _apply_set_operation.

    approx_count_distinct_sql

    fn approx_count_distinct_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python approx_count_distinct_sql.

    arg_max_or_min_no_count

    fn arg_max_or_min_no_count(name : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python arg_max_or_min_no_count(name).

    array_

    fn array_(expressions : Array[Expr], copy? : Bool) -> Expr

    exp.array(*expressions) (copied unless copy is false).

    array_append_sql

    fn array_append_sql(name : String, swap_params? : Bool) -> ((Generator, Expr) -> String raise SqlglotError)

    Python array_append_sql(name, swap_params): transpiles ARRAY_APPEND/ARRAY_PREPEND between dialects with different NULL propagation semantics.

    array_compact_sql

    fn array_compact_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python array_compact_sql.

    array_concat_sql

    fn array_concat_sql(name : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python array_concat_sql(name): transpiles ARRAY_CONCAT/ARRAY_CAT between dialects with different NULL propagation semantics.

    arrow_json_extract_sql

    fn arrow_json_extract_sql(g : Generator, e : Expr, op? : String) -> String raise SqlglotError

    Python arrow_json_extract_sql(self, expression, op=None).

    base_after_having_modifier_transforms

    fn base_after_having_modifier_transforms() -> Array[(String, (Generator, Expr) -> String raise SqlglotError)]

    The base Generator's AFTER_HAVING_MODIFIER_TRANSFORMS.

    base_dialect

    fn base_dialect() -> Dialect

    The base sqlglot dialect (cached).

    base_dialect_config

    fn base_dialect_config() -> DialectConfig

    base_generator_config

    fn base_generator_config() -> GeneratorConfig

    base_generator_fns

    fn base_generator_fns() -> GeneratorFns

    The base Generator's TRANSFORMS and other callable tables.

    base_generator_transforms

    fn base_generator_transforms() -> Map[Kind, (Generator, Expr) -> String raise SqlglotError]

    The base Generator's TRANSFORMS.

    base_jsonpath_tokenizer_settings_raw

    fn base_jsonpath_tokenizer_settings_raw() -> TokenizerSettings

    base_parser_config

    fn base_parser_config() -> ParserConfig

    base_parser_fns

    fn base_parser_fns() -> ParserFns

    The base Parser's FUNCTIONS and *_PARSERS tables.

    base_tokenizer_settings_raw

    fn base_tokenizer_settings_raw() -> TokenizerSettings

    binary_from_function

    fn binary_from_function(kind : Kind) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python binary_from_function(expr_type).

    binary_range_parser

    fn binary_range_parser(kind : Kind, reverse_args? : Bool) -> ((Parser, Expr?) -> Expr? raise SqlglotError)

    binary_range_parser(expr_type, reverse_args)

    bool_xor_sql

    fn bool_xor_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python bool_xor_sql.

    boolean

    fn boolean(b : Bool) -> Expr

    bracket_to_element_at_sql

    fn bracket_to_element_at_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python bracket_to_element_at_sql.

    build_array_append

    fn build_array_append(args : Array[Expr], p : Parser) -> Expr

    build_array_concat

    fn build_array_concat(args : Array[Expr], p : Parser) -> Expr

    build_array_constructor

    fn build_array_constructor(kind : Kind, args : Array[Expr], bracket_kind : TokenType, dialect : Dialect) -> Expr

    build_array_prepend

    fn build_array_prepend(args : Array[Expr], p : Parser) -> Expr

    build_array_remove

    fn build_array_remove(args : Array[Expr], p : Parser) -> Expr

    build_coalesce

    fn build_coalesce(args : Array[Expr], is_nvl? : Bool, is_null? : Bool) -> Expr

    build_convert_timezone

    fn build_convert_timezone(args : Array[Expr], default_source_tz? : String) -> Expr

    build_date_delta

    fn build_date_delta(kind : Kind, unit_mapping? : Map[String, String], default_unit? : String, supports_timezone? : Bool) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python build_date_delta(exp_class, unit_mapping=None, default_unit="DAY",supports_timezone=False). Pass default_unit="" for Python None.

    build_date_delta_with_interval

    fn build_date_delta_with_interval(kind : Kind, default_unit? : String) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python build_date_delta_with_interval(expression_class, default_unit=None). Python returns None for fewer than 2 arguments; this raises a ParseError instead.

    build_default_decimal_type

    fn build_default_decimal_type(precision? : Int, scale? : Int) -> ((Expr) -> Expr)

    Python build_default_decimal_type(precision=None, scale=None): a DataType converter that adds default DECIMAL parameters.

    build_extract_json_with_path

    fn build_extract_json_with_path(kind : Kind) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    build_formatted_time

    fn build_formatted_time(kind : Kind, dialect_override? : String, default? : Bool, default_format? : String) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python build_formatted_time(exp_class, dialect_override=None, default=None).

    build_formatted_time_expr

    fn build_formatted_time_expr(kind : Kind, args : Array[Expr], dialect : Dialect, dialect_override? : String, default? : Bool, default_format? : String) -> Expr raise SqlglotError

    Python build_formatted_time(exp_class, dialect_override, default)(args, dialect). default=true uses the dialect's TIME_FORMAT; default_format is a string default.

    build_hex

    fn build_hex(args : Array[Expr], p : Parser) -> Expr

    build_json_extract_op

    fn build_json_extract_op(p : Parser, this : Expr?, path : Expr?) -> Expr? raise SqlglotError

    JSON operator builders shared between COLUMN_OPERATORS and JSON_OPERATORS.

    build_json_extract_path

    fn build_json_extract_path(kind : Kind, zero_based_indexing? : Bool, arrow_req_json_type? : Bool, json_type? : String) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python build_json_extract_path(expr_type, zero_based_indexing=True,arrow_req_json_type=False, json_type=None). Like Python, it truncates args to 2 elements when the path is built.

    build_json_extract_scalar_op

    fn build_json_extract_scalar_op(p : Parser, this : Expr?, path : Expr?) -> Expr? raise SqlglotError

    build_jsonb_contains_top_key_op

    fn build_jsonb_contains_top_key_op(p : Parser, this : Expr?, key : Expr?) -> Expr? raise SqlglotError

    build_jsonb_extract_op

    fn build_jsonb_extract_op(p : Parser, this : Expr?, path : Expr?) -> Expr? raise SqlglotError

    build_jsonb_extract_scalar_op

    fn build_jsonb_extract_scalar_op(p : Parser, this : Expr?, path : Expr?) -> Expr? raise SqlglotError

    build_like

    fn build_like(args : Array[Expr]) -> Expr

    build_like_fn

    fn build_like_fn(kind : Kind, not_like? : Bool) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python build_like(expr_type, not_like=False) from dialects/dialect.py (named build_like_fn because the parser's build_like(args) already exists).

    build_locate_strposition

    fn build_locate_strposition(args : Array[Expr]) -> Expr

    build_logarithm

    fn build_logarithm(args : Array[Expr], p : Parser) -> Expr

    build_lower

    fn build_lower(args : Array[Expr]) -> Expr

    build_mod

    fn build_mod(args : Array[Expr]) -> Expr

    build_pad

    fn build_pad(args : Array[Expr], is_left? : Bool) -> Expr

    build_regexp_extract

    fn build_regexp_extract(kind : Kind) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    Python build_regexp_extract(expr_type).

    build_replace_with_optional_replacement

    fn build_replace_with_optional_replacement(args : Array[Expr]) -> Expr

    Python build_replace_with_optional_replacement(args).

    build_timestamp_from_parts

    fn build_timestamp_from_parts(args : Array[Expr]) -> Expr

    Python build_timestamp_from_parts(args).

    build_timestamp_trunc

    fn build_timestamp_trunc(args : Array[Expr]) -> Expr

    Python build_timestamp_trunc(args) (DATE_TRUNC in Doris, Postgres and StarRocks).

    build_timetostr_or_tochar

    fn build_timetostr_or_tochar(args : Array[Expr], dialect : Dialect) -> Expr raise SqlglotError

    Python build_timetostr_or_tochar(args, dialect).

    build_trim

    fn build_trim(args : Array[Expr], is_left? : Bool, reverse_args? : Bool) -> Expr

    build_trunc

    fn build_trunc(args : Array[Expr], dialect : Dialect, date_trunc_unabbreviate? : Bool, default_date_trunc_unit? : String, date_trunc_requires_part? : Bool, fractions_supported? : Bool) -> Expr raise SqlglotError

    Python build_trunc(args, dialect, ...): builder for dialects with an overloaded TRUNC (Oracle, Snowflake, etc). Uses type annotation to distinguish date vs numeric truncation and returns Anonymous if the type cannot be determined.

    build_upper

    fn build_upper(args : Array[Expr]) -> Expr

    build_var_map

    fn build_var_map(args : Array[Expr]) -> Expr

    camel_to_snake_case

    fn camel_to_snake_case(name : String) -> String

    Converts name from CamelCase to SNAKE_CASE (upper).

    case_

    fn case_(this? : Expr) -> Expr

    exp.case() builder.

    case_else

    fn case_else(case_ : Expr, value : Expr, copy? : Bool) -> Expr

    Python Case.else_(value, copy).

    case_when

    fn case_when(case_ : Expr, condition : Expr, then : Expr, copy? : Bool) -> Expr

    Python Case.when(condition, then, copy).

    cast_

    fn cast_(expression : Expr, to : DType, copy? : Bool) -> Expr

    exp.cast(expression, to) with a DType target. Avoids re-casting to the same type.

    cast_to

    fn cast_to(expression : Expr, to : Expr, copy? : Bool) -> Expr

    exp.cast(expression, to) with a DataType expression target.

    cast_to_type

    fn cast_to_type(expression : Expr, to : Expr) -> Expr

    exp.cast(expression, to, copy=False) for an already-built DataType.

    char_lower

    fn char_lower(c : Char) -> Char

    The first code point of str(c).lower() (CPython's _PyUnicode_ToLowercase, which is also re's case-insensitive key _sre.unicode_tolower).

    char_upper

    fn char_upper(c : Char) -> Char

    The first code point of str(c).upper() (CPython's _PyUnicode_ToUppercase).

    code_point_offsets

    fn code_point_offsets(s : String) -> Array[Int]

    The UTF-16 offset of every code point of s, plus s.length() at the end; [] when s has no surrogate pairs (offsets equal code point indices).

    column_from_parts

    fn column_from_parts(col : Expr, table? : Expr?, db? : Expr?, catalog? : Expr?, fields? : Array[Expr]) -> Expr

    exp.column(col, table, db, catalog, fields=...) with identifier expressions.

    column_of

    fn column_of(name : String, table? : String, quoted? : Bool) -> Expr

    exp.column(name) for a simple (possibly quoted) column name.

    column_table_names

    fn column_table_names(expression : Expr, exclude? : String) -> Array[String]

    exp.column_table_names(expression, exclude)

    combine_conditions

    fn combine_conditions(conditions : Array[Expr], connector : Kind, copy? : Bool, wrap? : Bool) -> Expr

    Combines conditions with a connector (And / Or / Xor), wrapping operands that are themselves connectors in parentheses (Python _combine). As in Python, the conditions are copied unless copy is false.

    combine_py

    fn combine_py(expressions : Array[PyObj], operator : Kind, dialect? : Dialect, copy? : Bool, wrap? : Bool) -> Expr raise SqlglotError

    Python _combine: parses the conditions and combines them with operator (And, Or or Xor), wrapping connector operands in parentheses when wrap is set.

    concat_messages

    fn concat_messages(errors : Array[String], maximum : Int) -> String

    concat_to_dpipe_sql

    fn concat_to_dpipe_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python concat_to_dpipe_sql (same as Generator::concat_to_dpipe_sql).

    concat_ws_to_dpipe_sql

    fn concat_ws_to_dpipe_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python concat_ws_to_dpipe_sql.

    condition

    fn[T : IntoPy] condition(expression : T, dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    Python exp.condition(expression): parses a logical condition.

    convert

    fn[T : IntoPy] convert(value : T, copy? : Bool) -> Expr raise SqlglotError

    Python exp.convert: converts a host value into an expression. Raises ValueError when a conversion is not possible.

    count_if_to_sum

    fn count_if_to_sum(g : Generator, e : Expr) -> String raise SqlglotError

    Python count_if_to_sum.

    csv

    fn csv(args : Array[String], sep? : String) -> String

    sqlglot helper.csv: joins the non-empty strings with sep.

    ctas_with_tmp_tables_to_create_tmp_view

    fn ctas_with_tmp_tables_to_create_tmp_view(tmp_storage_provider? : (Expr) -> Expr raise SqlglotError) -> ((Expr) -> Expr raise SqlglotError)

    datatype_build

    fn datatype_build(dtype : DType, kwargs? : ArrayView[(String, &IntoValue)]) -> Expr

    DataType.build(dtype, **kwargs) for a DType.

    datatype_from_str

    fn datatype_from_str(dtype : String, dialect? : Dialect, udt? : Bool) -> Expr raise SqlglotError

    Python DataType.from_str.

    datatype_is_type

    fn datatype_is_type(dt : Expr, dtypes : ArrayView[DType]) -> Bool

    DataType.is_type(*dtypes) for plain DTypes.

    datatype_is_type_expr

    fn datatype_is_type_expr(dt : Expr, other : Expr) -> Bool

    DataType.is_type(other) for a DataType expression other.

    datatype_of

    fn datatype_of(dtype : DType) -> Expr

    DataType(this=dtype) (Python DType.into_expr() / DataType.build(dtype)).

    date_add_interval_sql

    fn date_add_interval_sql(data_type : String, kind : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python date_add_interval_sql(data_type, kind): <data_type>_<kind>(this, INTERVAL ...).

    date_delta_sql

    fn date_delta_sql(name : String, cast? : Bool) -> ((Generator, Expr) -> String raise SqlglotError)

    Python date_delta_sql(name, cast=False): name(unit, expression, this).

    date_delta_to_binary_interval_op

    fn date_delta_to_binary_interval_op(cast? : Bool) -> ((Generator, Expr) -> String raise SqlglotError)

    Python date_delta_to_binary_interval_op(cast=True): this +/- INTERVAL ....

    date_trunc_to_time

    fn date_trunc_to_time(args : Array[Expr]) -> Expr

    Python date_trunc_to_time(args).

    datestrtodate_sql

    fn datestrtodate_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python datestrtodate_sql.

    decimal_value

    fn decimal_value(c : Char) -> Int

    The value of a decimal digit (unicodedata.decimal), or -1.

    default_pretty

    let default_pretty :
    Ref
    [Bool]

    Python's module-level sqlglot.pretty: the default for generators created without an explicit pretty option.

    dialect_class_name

    fn dialect_class_name(d : Dialect) -> String

    Python Dialect.__class__.__name__ for a dialect.

    dialect_names

    fn dialect_names() -> Array[String]

    Names of all registered dialects.

    div_

    fn div_(a : Expr, b : Expr) -> Expr

    Python expr / other.

    dot_build

    fn dot_build(expressions : Array[Expr]) -> Expr

    Dot.build(expressions)

    dtype_array_types

    let dtype_array_types : Array[DType]

    dtype_binary_types

    let dtype_binary_types : Array[DType]

    dtype_float_types

    let dtype_float_types : Array[DType]

    dtype_from_name

    fn dtype_from_name(name : String) -> DType?

    dtype_from_value

    fn dtype_from_value(value : String) -> DType?

    dtype_integer_types

    let dtype_integer_types : Array[DType]

    dtype_nested_types

    let dtype_nested_types : Array[DType]

    dtype_numeric_types

    let dtype_numeric_types : Array[DType]

    dtype_real_types

    let dtype_real_types : Array[DType]

    dtype_signed_integer_types

    let dtype_signed_integer_types : Array[DType]

    dtype_struct_types

    let dtype_struct_types : Array[DType]

    dtype_temporal_types

    let dtype_temporal_types : Array[DType]

    dtype_text_types

    let dtype_text_types : Array[DType]

    dtype_unsigned_integer_types

    let dtype_unsigned_integer_types : Array[DType]

    eliminate_distinct_on

    fn eliminate_distinct_on(expression : Expr) -> Expr raise SqlglotError

    Convert SELECT DISTINCT ON statements to a subquery with a window function.

    eliminate_full_outer_join

    fn eliminate_full_outer_join(expression : Expr) -> Expr raise SqlglotError

    Converts a query with a FULL OUTER join to a union of identical queries that use LEFT/RIGHT OUTER joins instead.

    eliminate_qualify

    fn eliminate_qualify(expression : Expr) -> Expr raise SqlglotError

    Convert SELECT statements that contain the QUALIFY clause into subqueries.

    eliminate_semi_and_anti_joins

    fn eliminate_semi_and_anti_joins(expression : Expr) -> Expr raise SqlglotError

    Convert SEMI and ANTI joins into equivalent forms that use EXIST instead.

    eliminate_window_clause

    fn eliminate_window_clause(expression : Expr) -> Expr raise SqlglotError

    Eliminates the WINDOW query clause by inlining each named window.

    encode_decode_sql

    fn encode_decode_sql(g : Generator, e : Expr, name : String, replace? : Bool) -> String raise SqlglotError

    Python encode_decode_sql(self, expression, name, replace=True). Used for dialects whose functions don't support a charset and assume utf-8.

    ends_with

    fn ends_with(s : String, suffix : String) -> Bool

    ensure_bools

    fn ensure_bools(expression : Expr) -> Expr

    Converts numeric values used in conditions into explicit boolean expressions (Python transforms.ensure_bools).

    epoch_cast_to_ts

    fn epoch_cast_to_ts(expression : Expr) -> Expr raise SqlglotError

    Replace 'epoch' in casts by the equivalent date literal.

    exp_add

    fn exp_add(this : Expr, other : Expr) -> Expr

    Python this + other.

    exp_alias

    fn exp_alias(expression : Expr, alias_ : Value, quoted? : Bool, copy? : Bool) -> Expr raise SqlglotError

    Python alias_(expression, alias) with table=False.

    exp_and

    fn exp_and(expressions : Array[Expr], copy? : Bool, wrap? : Bool) -> Expr

    Python and_(*expressions).

    exp_binop

    fn exp_binop(kind : Kind, this : Expr, other : Expr) -> Expr

    Python Expr._binop(klass, other).

    exp_case

    fn exp_case() -> Expr

    Python exp.case().

    exp_cast

    fn exp_cast(expression : Expr, to : DType, copy? : Bool, dialect? : Dialect) -> Expr

    Python exp.cast(expression, dtype, copy, dialect) with a DType.

    exp_cast_to

    fn exp_cast_to(expression : Expr, to : Expr, copy? : Bool, dialect? : Dialect) -> Expr

    Python exp.cast(expression, to, copy, dialect) with a DataType expression.

    exp_div

    fn exp_div(this : Expr, other : Expr) -> Expr

    Python this / other.

    exp_eq

    fn exp_eq(this : Expr, other : Expr) -> Expr

    Python this.eq(other).

    exp_is

    fn exp_is(this : Expr, other : Expr) -> Expr

    Python this.is_(other).

    exp_neq

    fn exp_neq(this : Expr, other : Expr) -> Expr

    Python this.neq(other).

    exp_not

    fn exp_not(expression : Expr, copy? : Bool) -> Expr

    Python not_(expression, copy).

    exp_or

    fn exp_or(expressions : Array[Expr], copy? : Bool, wrap? : Bool) -> Expr

    Python or_(*expressions).

    exp_paren

    fn exp_paren(expression : Expr, copy? : Bool) -> Expr

    Python paren(expression, copy).

    exp_select_from

    fn exp_select_from(projections : Array[Expr], from_expr : Expr) -> Expr

    Python exp.select(*projections).from_(from_expr, copy=False).

    exp_subquery_of

    fn exp_subquery_of(query : Expr, alias_? : String, copy? : Bool) -> Expr

    Python Query.subquery(alias, copy).

    exp_subquery_with_alias_expr

    fn exp_subquery_with_alias_expr(query : Expr, alias_ : Expr?, copy? : Bool) -> Expr

    Python Query.subquery(alias_expr, copy) where alias is already an expression.

    exp_table_from_identifier

    fn exp_table_from_identifier(table : Expr?) -> Expr raise SqlglotError

    Python exp.table_(name) for an identifier expression.

    exp_union

    fn exp_union(left : Expr, right : Expr, distinct? : Bool) -> Expr

    Python exp.union(left, right, distinct=distinct, copy=False).

    exp_wrap

    fn exp_wrap(expression : Expr, kind : Kind) -> Expr

    Python _wrap(expression, kind): wraps in a Paren if it is a kind.

    explode_to_unnest_sql

    fn explode_to_unnest_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python explode_to_unnest_sql (for Lateral).

    expr_or

    fn expr_or(a : Expr?, b : () -> Expr? raise SqlglotError) -> Expr? raise SqlglotError

    Python a or b for optional expressions.

    expr_to_sql

    fn expr_to_sql(expression : Expr) -> String raise SqlglotError

    Generates SQL for expression with the base dialect and default settings (Python str(expression) / expression.sql()).

    false_

    fn false_() -> Expr

    filter_array_using_unnest

    fn filter_array_using_unnest(g : Generator, e : Expr) -> String raise SqlglotError

    Python filter_array_using_unnest.

    find_all_in_scope

    fn find_all_in_scope(expression : Expr, kinds : ArrayView[Kind]) -> Array[Expr]

    find_in_scope

    fn find_in_scope(expression : Expr, kinds : ArrayView[Kind]) -> Expr?

    find_new_name

    fn find_new_name(taken : (String) -> Bool, base : String) -> String

    Searches for a name that isn't in taken.

    find_tables

    fn find_tables(expression : Expr) -> Array[Expr]

    exp.find_tables(expression)

    format_time

    fn format_time(string : String, mapping : Map[String, String], trie : Trie) -> String

    format_time returning Python's str(None) for empty input, which is what exp.Literal.string(format_time(...)) produces.

    format_time_opt

    fn format_time_opt(string : String, mapping : Map[String, String], trie? : Trie) -> String?

    Converts a time string given a mapping (Python format_time). Returns None for an empty string.

    from_arg_list

    fn from_arg_list(kind : Kind, args : Array[Expr]) -> Expr

    Func.from_arg_list(args)

    from_arg_list_builder

    fn from_arg_list_builder(kind : Kind) -> ((Array[Expr], Parser) -> Expr raise SqlglotError)

    A builder that calls from_arg_list.

    func_

    fn func_(name : String, args : Array[Expr], dialect? : Dialect) -> Expr raise SqlglotError

    exp.func(name, *args): builds a known function via the dialect's FUNCTIONS, or an Anonymous function.

    function_by_name

    let function_by_name : Array[(String, Kind)]

    exp.FUNCTION_BY_NAME: SQL function names to function kinds.

    gen_annotate_types

    fn gen_annotate_types(expression : Expr, dialect : Dialect) -> Expr raise SqlglotError

    Annotates types using annotate_types_hook, or a minimal fallback that only types integer literals.

    gen_apply_index_offset

    fn gen_apply_index_offset(this : Expr, expressions : Array[Expr], offset : Int, dialect : Dialect) -> Array[Expr] raise SqlglotError

    Python expressions.apply_index_offset.

    gen_find_all_in_scope

    fn gen_find_all_in_scope(expression : Expr, kinds : ArrayView[Kind]) -> Array[Expr]

    Python optimizer.scope.find_all_in_scope.

    gen_map_date_part

    fn gen_map_date_part(part : Expr?, dialect : Dialect) -> Expr?

    Python dialects.dialect.map_date_part.

    gen_unit_to_str

    fn gen_unit_to_str(expression : Expr, default? : String) -> Expr?

    Python dialects.dialect.unit_to_str.

    gen_walk_in_scope

    fn gen_walk_in_scope(expression : Expr, out : Array[Expr]) -> Unit

    Python optimizer.scope.walk_in_scope: visits all nodes in the syntax tree, stopping at nodes that start child scopes.

    gen_week_offset_to_dow

    fn gen_week_offset_to_dow(offset : Int) -> Int

    sqlglot.dialects.dialect.week_offset_to_dow.

    gen_week_start_day_to_dow

    let gen_week_start_day_to_dow : Map[String, Int]

    sqlglot.dialects.dialect.WEEK_START_DAY_TO_DOW.

    generate_series_sql

    fn generate_series_sql(func_name : String, exclusive_func_name? : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python generate_series_sql(func_name, exclusive_func_name).

    generatedasidentitycolumnconstraint_sql

    fn generatedasidentitycolumnconstraint_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python generatedasidentitycolumnconstraint_sql (dialect helper): IDENTITY(start, increment).

    get_dialect

    fn get_dialect(name : String) -> Dialect?

    Looks up a registered dialect by name (cached).

    getbit_sql

    fn getbit_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python getbit_sql: GET_BIT, transpiled to (value >> position) & 1 when the zero index is the least-significant bit and the input is an integer.

    groupconcat_sql

    fn groupconcat_sql(g : Generator, e : Expr, func_name? : String, sep? : String, within_group? : Bool, on_overflow? : Bool) -> String raise SqlglotError

    Python groupconcat_sql(self, expression, func_name="LISTAGG", sep=",",within_group=True, on_overflow=False). Pass sep="" for Python sep=None.

    highlight_sql

    fn highlight_sql(sql : String, positions : Array[(Int, Int)], context_length? : Int) -> (String, String, String, String) raise SqlglotError

    Highlight a SQL string using ANSI codes at the given (inclusive) positions.

    ident

    fn ident(name : String) -> Expr

    if_sql

    fn if_sql(name? : String, false_value? : Expr) -> ((Generator, Expr) -> String raise SqlglotError)

    Python if_sql(name, false_value).

    if_sql_str

    fn if_sql_str(name? : String, false_value : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python if_sql(name, false_value) with a string false_value (raw SQL).

    in_trie

    fn in_trie(trie : Trie, key : ArrayView[String]) -> (TrieResult, Trie)

    Checks whether a key is in a trie.

    in_trie_chars

    fn in_trie_chars(trie : Trie, key : ArrayView[Char]) -> (TrieResult, Trie)

    Checks whether a key (sequence of chars) is in a trie.

    inherit_struct_field_names

    fn inherit_struct_field_names(expression : Expr) -> Expr raise SqlglotError

    Inherit field names from the first struct in an array.

    inline_array_sql

    fn inline_array_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python inline_array_sql.

    inline_array_unless_query

    fn inline_array_unless_query(g : Generator, e : Expr) -> String raise SqlglotError

    Python inline_array_unless_query.

    int64_range_error

    fn int64_range_error(what : String) -> SqlglotError

    The error raised where Python would hold an integer outside the Int64 range: the port's AST integers (Value::Int), host ints (PyInt) and executor integers are 64-bit, so such values are refused instead of wrapping or being silently changed.

    int_str_from_base

    fn int_str_from_base(text : String, base : Int) -> String raise SqlglotError

    Python str(int(text, base)): converts a (possibly huge) number written in base into its decimal representation.

    interval_day_time_match

    fn interval_day_time_match(text : String) -> Bool

    INTERVAL_DAY_TIME_RE.match(text): \s*-?\s*\d+(?:\.\d+)?\s+(?:-?(?:\d+:)?\d+:\d+(?:\.\d+)?|-?(?:\d+:){1,2}|:)\s*

    interval_string_findall

    fn interval_string_findall(text : String) -> Array[(String, String)]

    INTERVAL_STRING_RE.findall(text) returning (value, unit) pairs: \s*(-?[0-9]+(?:\.[0-9]+)?)\s*([a-zA-Z]+)\s*

    is_alnum

    fn is_alnum(c : Char) -> Bool

    Python str.isalnum() for one character.

    is_alpha

    fn is_alpha(c : Char) -> Bool

    Python str.isalpha() for one character.

    is_decimal

    fn is_decimal(c : Char) -> Bool

    Python str.isdecimal() for one character (also re's \d).

    is_digit_char

    fn is_digit_char(c : Char) -> Bool

    ASCII 0-9 (Python code testing membership in "0123456789").

    is_float_str

    fn is_float_str(text : String) -> Bool

    Python float(text) succeeds.

    is_identifier_char

    fn is_identifier_char(c : Char) -> Bool

    Python str.isidentifier() for a one-character string (XID_Start or _).

    is_identifier_continue

    fn is_identifier_continue(c : Char) -> Bool

    Whether c may continue a Python identifier (XID_Continue).

    is_int_str

    fn is_int_str(text : String) -> Bool

    Python int(text) succeeds.

    is_lower_char

    fn is_lower_char(c : Char) -> Bool

    Python str.islower() for one character.

    is_numeric

    fn is_numeric(c : Char) -> Bool

    Python str.isnumeric() for one character.

    is_parse_json

    fn is_parse_json(e : Expr) -> Bool

    Python is_parse_json.

    is_printable

    fn is_printable(c : Char) -> Bool

    Python str.isprintable() for one character.

    is_py_digit

    fn is_py_digit(c : Char) -> Bool

    Python str.isdigit() for one character (includes e.g. superscripts like ²). See is_digit_char for the ASCII 0-9 test.

    is_safe_identifier

    fn is_safe_identifier(text : String) -> Bool

    Whether text matches ^[_a-zA-Z][\w]*$ (Python SAFE_IDENTIFIER_RE; $ also matches before a trailing newline).

    is_space

    fn is_space(c : Char) -> Bool

    Python str.isspace() for one character (also re's \s).

    is_upper_char

    fn is_upper_char(c : Char) -> Bool

    Python str.isupper() for one character.

    is_word_char

    fn is_word_char(c : Char) -> Bool

    re's \w for one character (str.isalnum() or _).

    isnull_to_is_null

    fn isnull_to_is_null(args : Array[Expr]) -> Expr

    Python isnull_to_is_null(args).

    jarowinkler_similarity

    fn jarowinkler_similarity(func : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python jarowinkler_similarity(func).

    json_extract_segments

    fn json_extract_segments(name : String, quoted_index? : Bool, op? : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python json_extract_segments(name, quoted_index, op).

    json_path_key_only_name

    fn json_path_key_only_name(g : Generator, e : Expr) -> String raise SqlglotError

    Python json_path_key_only_name.

    json_path_part_transforms

    fn json_path_part_transforms() -> Map[Kind, (Generator, Expr) -> String raise SqlglotError]

    sqlglot.jsonpath.JSON_PATH_PART_TRANSFORMS.

    json_quote

    fn json_quote(s : String) -> String

    Python json.dumps(s, ensure_ascii=False).

    kind_from_key

    fn kind_from_key(key : String) -> Kind?

    Looks up a kind by its lowercase key, e.g. "select".

    kind_from_name

    fn kind_from_name(name : String) -> Kind?

    Looks up a kind by its class name, e.g. "Select".

    left_to_substring_sql

    fn left_to_substring_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python left_to_substring_sql.

    length_or_char_length_sql

    fn length_or_char_length_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python length_or_char_length_sql.

    literal_int

    fn literal_int(n : Int) -> Expr

    Builds a number literal from an integer.

    literal_number

    fn literal_number(text : String) -> Expr

    Builds a number literal from its textual representation. Negative numbers are wrapped in Neg.

    literal_string

    fn literal_string(s : String) -> Expr

    Builds a string literal.

    log_error

    fn log_error(msg : String) -> Unit

    log_info

    fn log_info(msg : String) -> Unit

    log_warning

    fn log_warning(msg : String) -> Unit

    lstrip_chars

    fn lstrip_chars(s : String, chars : String) -> String

    Python str.lstrip(chars).

    map_date_part

    fn map_date_part(part : Expr?, dialect? : Dialect) -> Expr?

    Python map_date_part(part, dialect). dialect defaults to the base dialect.

    map_date_part_expr

    fn map_date_part_expr(part : Expr, dialect? : Dialect) -> Expr

    Python map_date_part(part, dialect) for a non-optional part.

    max_int

    fn max_int(a : Int, b : Int) -> Int

    max_or_greatest

    fn max_or_greatest(g : Generator, e : Expr) -> String raise SqlglotError

    Python max_or_greatest.

    maybe_copy

    fn maybe_copy(e : Expr, copy : Bool) -> Expr

    maybe_parse

    fn[T : IntoPy] maybe_parse(sql_or_expression : T, into? : ArrayView[Kind], dialect? : Dialect, prefix? : String, copy? : Bool, error_level? : ErrorLevel) -> Expr raise SqlglotError

    Python maybe_parse: returns the given expression (copied if copy), or parses the given SQL code (str(sql_or_expression), optionally prefixed by prefix) into one of the kinds into.

    maybe_parse_str

    fn maybe_parse_str(sql : String, dialect? : Dialect) -> Expr raise SqlglotError

    Python maybe_parse(sql, dialect=dialect) for a SQL string.

    merge_ranges

    fn[T : Compare + Eq] merge_ranges(ranges : Array[(T, T)]) -> Array[(T, T)]

    Python helper.merge_ranges: merges a sequence of (low, high) ranges whose values belong to some totally-ordered set.

    merge_without_target_sql

    fn merge_without_target_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python merge_without_target_sql: removes table refs from columns in WHEN clauses.

    min_int

    fn min_int(a : Int, b : Int) -> Int

    min_or_least

    fn min_or_least(g : Generator, e : Expr) -> String raise SqlglotError

    Python min_or_least.
    fn mk(kind : Kind, args : ArrayView[(String, &IntoValue)]) -> Expr

    Builds an expression, Python style: mk(Column, [("this", ident), ("table", tbl)]).

    mk0

    fn mk0(kind : Kind) -> Expr

    Builds an expression with no arguments.

    mk1

    fn mk1(kind : Kind, this : &IntoValue) -> Expr

    Builds an expression with a single this argument.

    mk2

    fn mk2(kind : Kind, this : &IntoValue, expression : &IntoValue) -> Expr

    Builds an expression with this and expression arguments.

    months_between_sql

    fn months_between_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python months_between_sql: transpiles MONTHS_BETWEEN to dialects without native support (DATEDIFF('month', d2, d1) + (DAY(d1) - DAY(d2)) / 31.0, with a last day of month check).

    move_ctes_to_top_level

    fn move_ctes_to_top_level(expression : Expr) -> Expr

    Some dialects only allow CTEs to be defined at the top-level. This moves all nested CTEs to the top level (Python transforms.move_ctes_to_top_level).

    move_partitioned_by_to_schema_columns

    fn move_partitioned_by_to_schema_columns(expression : Expr) -> Expr raise SqlglotError

    move_schema_columns_to_partitioned_by

    fn move_schema_columns_to_partitioned_by(expression : Expr) -> Expr raise SqlglotError

    mul_

    fn mul_(a : Expr, b : Expr) -> Expr

    Python expr * other.

    name_sequence

    fn name_sequence(prefix : String) -> (() -> String)

    Returns a name generator given a prefix (e.g. a0, a1, a2...).

    new_trie

    fn new_trie(keywords : Iter[String]) -> Trie

    Creates a new trie out of a collection of keywords.

    no_comment_column_constraint_sql

    fn no_comment_column_constraint_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_comment_column_constraint_sql.

    no_datetime_sql

    fn no_datetime_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_datetime_sql.

    no_ilike_sql

    fn no_ilike_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_ilike_sql.

    no_last_day_sql

    fn no_last_day_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_last_day_sql.

    no_make_interval_sql

    fn no_make_interval_sql(g : Generator, e : Expr, sep? : String) -> String raise SqlglotError

    Python no_make_interval_sql(self, expression, sep=", ").

    no_map_from_entries_sql

    fn no_map_from_entries_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_map_from_entries_sql.

    no_paren_current_date_sql

    fn no_paren_current_date_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_paren_current_date_sql.

    no_pivot_sql

    fn no_pivot_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_pivot_sql.

    no_recursive_cte_sql

    fn no_recursive_cte_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_recursive_cte_sql.

    no_tablesample_sql

    fn no_tablesample_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_tablesample_sql.

    no_time_sql

    fn no_time_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_time_sql: transpiles BigQuery's TIME(timestamp, zone) to CAST(CAST(<timestamp> AS TIMESTAMPTZ) AT TIME ZONE <zone> AS TIME).

    no_timestamp_sql

    fn no_timestamp_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_timestamp_sql.

    no_trycast_sql

    fn no_trycast_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python no_trycast_sql.

    normalize_identifiers

    fn normalize_identifiers(expression : Expr, dialect : Dialect, store_original_column_identifiers? : Bool) -> Expr

    normalize_identifiers(expression, dialect) (sqlglot.optimizer.normalize_identifiers).

    not_

    fn not_(e : Expr, copy? : Bool) -> Expr

    exp.not_(expression) (copied unless copy is false).

    nth_value_from_sql

    fn nth_value_from_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python nth_value_from_sql.

    null_

    fn null_() -> Expr

    null_arg

    let null_arg : Value?

    The "no value" argument, i.e. Python None.

    number_value

    fn number_value(e : Expr) -> Value

    Python literal.to_py() for a numeric literal, as an argument value (int when integral, else the textual decimal).

    opt_list

    fn opt_list(e : Expr?) -> Array[Expr]

    Python ensure_list(x) for an optional expression.

    or_

    fn or_(conditions : Array[Expr], copy? : Bool, wrap? : Bool) -> Expr

    exp.or_(...) for expressions (copied unless copy is false).

    paren

    fn paren(e : Expr, copy? : Bool) -> Expr

    exp.paren(expression) (copied unless copy is false).

    parse

    fn parse(sql : String, dialect? : Dialect, error_level? : ErrorLevel, error_message_context? : Int, max_errors? : Int, max_nodes? : Int) -> Array[Expr?] raise SqlglotError

    Parses all statements of sql.

    parse_identifier

    fn parse_identifier(name : String, dialect? : Dialect) -> Expr

    exp.parse_identifier(name, dialect)

    parse_int_checked

    fn parse_int_checked(text : String) -> Int64? raise SqlglotError

    Python int(text) as an Int64: None when text isn't an integer literal, and int64_range_error when it is one outside the Int64 range.

    parse_int_str

    fn parse_int_str(text : String) -> Int64?

    Parses a Python-style integer string (allowing _ separators and sign); None when it isn't an integer or is outside the Int64 range (see parse_int_checked).

    parse_json_path

    fn parse_json_path(path : String, dialect : Dialect) -> Expr raise SqlglotError

    Takes in a JSON path string and parses it into a JSONPath expression.

    parse_one

    fn parse_one(sql : String, dialect? : Dialect, into? : Array[Kind], error_level? : ErrorLevel, error_message_context? : Int, max_errors? : Int, max_nodes? : Int, into_is_list? : Bool) -> Expr raise SqlglotError

    Parses the given SQL string and returns a syntax tree.

    parse_one_with

    fn parse_one_with(sql : String, read : String, into? : Array[Kind]) -> Expr raise SqlglotError

    Parses with a dialect given by name (e.g. "duckdb").

    pivot_column_names

    fn pivot_column_names(aggregations : Array[Expr], dialect : Dialect) -> Array[String] raise SqlglotError

    Python pivot_column_names(aggregations, dialect).

    preprocess

    fn preprocess(transforms : Array[(Expr) -> Expr raise SqlglotError], generator? : (Generator, Expr) -> String raise SqlglotError) -> ((Generator, Expr) -> String raise SqlglotError)

    Creates a generator function by chaining a sequence of transformations and converting the resulting expression to SQL (Python transforms.preprocess).

    properties_from_dict

    fn properties_from_dict(properties : Map[String, PyObj]) -> Expr raise SqlglotError

    Properties.from_dict(properties)

    property_sql

    fn property_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python property_sql (dialect helper): 'name'=value.

    property_to_name

    let property_to_name : Map[Kind, String]

    exp.Properties.PROPERTY_TO_NAME.

    py_casefold

    fn py_casefold(s : String) -> String

    Python str.casefold() (full Unicode case folding, e.g. ß -> ss).

    py_decimal_str

    fn py_decimal_str(text : String) -> String

    Python str(Decimal(text)): keeps the literal mostly as written, normalizing exponent formatting and leading +/..

    py_float_repr

    fn py_float_repr(d : Double) -> String

    Python repr(float).

    py_int_text_add

    fn py_int_text_add(text : String, delta : Int) -> String?

    str(int(text) + delta) for an integer literal text of any size, else None.

    py_len

    fn py_len(s : String) -> Int

    Number of code points of a string (Python len).

    py_list

    fn[T : IntoPy] py_list(xs : Array[T]) -> Array[PyObj]

    Converts builder arguments to host values.

    py_lower

    fn py_lower(s : String) -> String

    Python str.lower() (full Unicode case mapping, e.g. İ -> i̇, including the Final_Sigma rule for Σ).

    py_lstrip

    fn py_lstrip(s : String) -> String

    Python str.lstrip().

    py_repr_str

    fn py_repr_str(s : String) -> String

    Python's repr() for a string (single-quoted unless it contains single quotes only; non-printable characters are escaped as \xhh, \uhhhh or \Uhhhhhhhh).

    py_rstrip

    fn py_rstrip(s : String) -> String

    Python str.rstrip().

    py_split

    fn py_split(s : String, sep : String) -> Array[String]

    Python str.split(sep).

    py_split_ws

    fn py_split_ws(s : String) -> Array[String]

    Python str.split() (no separator: splits on runs of whitespace).

    py_str_value

    fn py_str_value(v : Value?) -> String raise SqlglotError

    Python str(value) for an argument value, as used in f-strings (str(expr) generates SQL with the default dialect).

    py_strip

    fn py_strip(s : String) -> String

    Python str.strip() (whitespace).

    py_upper

    fn py_upper(s : String) -> String

    Python str.upper() (full Unicode case mapping, e.g. ß -> SS).

    re_ignorecase_char_eq

    fn re_ignorecase_char_eq(p : Char, c : Char) -> Bool

    Whether a pattern character p matches c under re.IGNORECASE (Unicode mode), as compiled by re: uncased characters match exactly; cased ones compare by _sre.unicode_tolower, also accepting re's extra equivalences (e.g. s/ſ, σ/ς).

    regexp_extract_sql

    fn regexp_extract_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python regexp_extract_sql.

    regexp_replace_global_modifier

    fn regexp_replace_global_modifier(e : Expr) -> Expr?

    Python regexp_replace_global_modifier.

    regexp_replace_sql

    fn regexp_replace_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python regexp_replace_sql.

    register_dialect

    fn register_dialect(name : String, make : () -> Dialect) -> Unit

    Registers a dialect constructor under name.

    remove_from_array_using_filter

    fn remove_from_array_using_filter(g : Generator, e : Expr) -> String raise SqlglotError

    Python remove_from_array_using_filter.

    remove_precision_parameterized_types

    fn remove_precision_parameterized_types(expression : Expr) -> Expr raise SqlglotError

    Removes the precision of parameterized types in expressions.

    remove_ts_or_ds_to_date

    fn remove_ts_or_ds_to_date(to_sql? : (Generator, Expr) -> String raise SqlglotError, args? : Array[String]) -> ((Generator, Expr) -> String raise SqlglotError)

    Python remove_ts_or_ds_to_date(to_sql=None, args=("this",)).

    remove_unique_constraints

    fn remove_unique_constraints(expression : Expr) -> Expr raise SqlglotError

    remove_within_group_for_percentiles

    fn remove_within_group_for_percentiles(expression : Expr) -> Expr raise SqlglotError

    Transforms percentiles by getting rid of their corresponding WITHIN GROUP clause.

    rename_func

    fn rename_func(name : String) -> ((Generator, Expr) -> String raise SqlglotError)

    Python rename_func(name): renders the expression as name(<all args>).

    replace_placeholders

    fn replace_placeholders(expression : Expr, kwargs : Map[String, Expr]) -> Expr

    exp.replace_placeholders(expression, **kwargs)

    right_to_substring_sql

    fn right_to_substring_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python right_to_substring_sql.

    select_

    fn[T : IntoPy] select_(expressions : Array[T], dialect? : Dialect, copy? : Bool) -> Expr raise SqlglotError

    exp.select(*expressions)

    select_star_from

    fn select_star_from(from_ : Expr?) -> Expr

    exp.select("*").from_(from_)

    sequence_sql

    fn sequence_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python sequence_sql (for GenerateSeries / GenerateDateArray).

    set_operation

    fn set_operation(kind : Kind, left : Expr, right : Expr, distinct? : Bool) -> Expr

    Builds a set operation (exp.union / exp.intersect / exp.except_).

    sha256_sql

    fn sha256_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python sha256_sql.

    sha2_digest_sql

    fn sha2_digest_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python sha2_digest_sql.

    simplify_hook

    let simplify_hook :
    Ref
    [(Expr, Dialect) -> Expr raise SqlglotError?]

    sqlglot_anonymous

    let sqlglot_anonymous : String

    sqlglot_meta

    let sqlglot_meta : String

    starts_with

    fn starts_with(s : String, prefix : String) -> Bool

    str_is_alnum

    fn str_is_alnum(s : String) -> Bool

    Python str.isalnum()-like check used for plain words.

    str_is_digit

    fn str_is_digit(s : String) -> Bool

    Python str.isdigit() for a whole string.

    str_is_identifier

    fn str_is_identifier(s : String) -> Bool

    Python str.isidentifier().

    strip_chars

    fn strip_chars(s : String, chars : String) -> String

    Python str.strip(chars).

    strposition_sql

    fn strposition_sql(g : Generator, e : Expr, func_name? : String, supports_position? : Bool, supports_occurrence? : Bool, use_ansi_position? : Bool) -> String raise SqlglotError

    Python strposition_sql.

    struct_extract_sql

    fn struct_extract_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python struct_extract_sql.

    struct_kv_to_alias

    fn struct_kv_to_alias(expression : Expr) -> Expr raise SqlglotError

    Converts struct arguments to aliases, e.g. STRUCT(1 AS y).

    sub_

    fn sub_(a : Expr, b : Expr) -> Expr

    Python expr - other.

    subclasses_of

    fn subclasses_of(base : Kind) -> Array[Kind]

    Returns all concrete kinds that are subclasses of base.

    subsecond_precision

    fn subsecond_precision(timestamp_literal : String) -> Int

    Port of sqlglot.time.subsecond_precision: given an ISO-8601 timestamp literal, e.g. '2023-01-01 12:13:14.123456+00:00', returns its subsecond precision (0, 3 or 6). Mirrors Python's datetime.fromisoformat; invalid literals yield 0.

    substr

    fn substr(s : String, start : Int, end : Int) -> String

    Python str[start:end] on code points.

    suggest_closest_match_and_fail

    fn[T] suggest_closest_match_and_fail(kind : String, word : String, possibilities : Array[String]) -> T raise SqlglotError

    Python suggest_closest_match_and_fail: raises a ValueError naming the closest candidate (similarity >= 0.6, approximating difflib.get_close_matches).

    table_of

    fn table_of(name : String) -> Expr

    table name -> Table expression (Python maybe_parse(name, into=From) for a name).

    take_log_messages

    fn take_log_messages() -> Array[String]

    Returns and clears the collected log messages.

    time_format

    fn time_format(dialect? : String) -> ((Generator, Expr) -> String? raise SqlglotError)

    Python time_format(dialect): returns the time format of an expression unless it's equivalent to the default time format of dialect (the base dialect if omitted).

    timestampdiff_sql

    fn timestampdiff_sql(g : Generator, e : Expr) -> String raise SqlglotError

    Python timestampdiff_sql.

    timestamptrunc_sql

    fn timestamptrunc_sql(func? : String, zone? : Bool) -> ((Generator, Expr) -> String raise SqlglotError)

    Python timestamptrunc_sql(func="DATE_TRUNC", zone=False).

    timestrtotime_sql

    fn timestrtotime_sql(g : Generator, e : Expr, include_precision? : Bool) -> String raise SqlglotError

    Python timestrtotime_sql(self, expression, include_precision=False).

    timezones

    let timezones :
    Set
    [String]

    Lower-cased IANA time zone names (Python sqlglot.time.TIMEZONES).

    to_ascii_decimal

    fn to_ascii_decimal(text : String) -> String

    Like CPython's _PyUnicode_TransformDecimalAndSpaceToASCII (used by int() and float()): replaces Unicode decimal digits by their ASCII digit and Unicode white space by a space.

    to_bool_str

    fn to_bool_str(value : String) -> Bool?

    Python to_bool helper.

    to_identifier

    fn to_identifier(name : String, quoted? : Bool) -> Expr

    Builds an identifier. When quoted is not given, the identifier is quoted only if it's not a safe identifier.

    to_identifier_expr

    fn to_identifier_expr(e : Expr) -> Expr

    Copies an identifier expression (Python to_identifier(identifier)).

    to_identifier_value

    fn to_identifier_value(name : Value, quoted? : Bool, copy? : Bool) -> Expr raise SqlglotError

    Python to_identifier(name, quoted, copy) for an identifier or a string value.

    to_number_with_nls_param

    fn to_number_with_nls_param(g : Generator, e : Expr) -> String raise SqlglotError

    Python to_number_with_nls_param.

    to_table

    fn to_table(name : String) -> Expr

    exp.to_table(name) for dotted names.

    token_repr

    fn token_repr(t : Token) -> String

    Python repr(token).

    token_type_from_name

    fn token_type_from_name(name : String) -> TokenType?

    transpile

    fn transpile(sql : String, read? : Dialect, write? : Dialect, pretty? : Bool, identify? : String, error_level? : ErrorLevel, unsupported_level? : ErrorLevel) -> Array[String] raise SqlglotError

    Parses sql with read and generates it with write (Python sqlglot.transpile).

    trim_sql

    fn trim_sql(g : Generator, e : Expr, default_trim_type? : String) -> String raise SqlglotError

    Python trim_sql(self, expression, default_trim_type="") (dialect helper).

    true_

    fn true_() -> Expr

    ts_or_ds_add_cast

    fn ts_or_ds_add_cast(e : Expr) -> Expr

    Python ts_or_ds_add_cast.

    ts_or_ds_add_return_type

    fn ts_or_ds_add_return_type(e : Expr) -> Expr

    Python TsOrDsAdd.return_type: DataType.build(return_type or DATE).

    tsort

    fn[T : Hash + Eq + Compare] tsort(dag : Map[T, Array[T]]) -> Array[T] raise SqlglotError

    Python helper.tsort: sorts a directed acyclic graph (node -> dependencies) in topological order; nodes that become ready at the same time are sorted. Raises ValueError("Cycle error") when the graph has a cycle.

    tsql_convert_format_mapping

    let tsql_convert_format_mapping : Map[String, String]

    TSQL.CONVERT_FORMAT_MAPPING (used by the base convert_sql).

    tuple_

    fn tuple_(expressions : Array[Expr], copy? : Bool) -> Expr

    exp.tuple_(*expressions) (copied unless copy is false).

    unabbreviate_unit

    fn unabbreviate_unit(name : String) -> String?

    unabbreviated_unit_name

    let unabbreviated_unit_name : Map[String, String]

    unicode_version

    let unicode_version : String

    unit_to_str

    fn unit_to_str(e : Expr, default? : String) -> Expr?

    Python unit_to_str(expression, default="DAY"). Pass default="" for Python None.

    unit_to_var

    fn unit_to_var(e : Expr, default? : String) -> Expr?

    Python unit_to_var(expression, default="DAY"). Pass default="" for Python None.

    unnest_generate_date_array_using_recursive_cte

    fn unnest_generate_date_array_using_recursive_cte(expression : Expr) -> Expr raise SqlglotError

    unnest_generate_series

    fn unnest_generate_series(expression : Expr) -> Expr raise SqlglotError

    Unnests GENERATE_SERIES or SEQUENCE table references.

    unnest_to_explode

    fn unnest_to_explode(unnest_using_arrays_zip? : Bool) -> ((Expr) -> Expr raise SqlglotError)

    Convert cross join unnest into lateral view explode.

    unqualify_columns

    fn unqualify_columns(expression : Expr) -> Expr raise SqlglotError

    unqualify_pivot_fields

    fn unqualify_pivot_fields(expression : Expr) -> Expr raise SqlglotError

    unqualify_unnest

    fn unqualify_unnest(expression : Expr) -> Expr raise SqlglotError

    Remove references to unnest table aliases, added by the optimizer's qualify_columns step.

    var_

    fn var_(name : String) -> Expr

    var_map_sql

    fn var_map_sql(g : Generator, e : Expr, map_func_name? : String) -> String raise SqlglotError

    Python var_map_sql(self, expression, map_func_name="MAP").

    var_of_expr

    fn var_of_expr(e : Expr) -> Expr

    exp.var(expr): builds a Var from an expression's name.

    walk_in_scope

    fn walk_in_scope(expression : Expr, prune? : (Expr) -> Bool) -> Array[Expr]

    Visits all nodes in the syntax tree, stopping at nodes that start child scopes.

    week_offset_to_dow

    fn week_offset_to_dow(offset : Int) -> Int

    Python week_offset_to_dow(offset): converts a dialect's WEEK_OFFSET (days relative to Monday) to the ISO day number of its week start.

    week_start_day_to_dow

    let week_start_day_to_dow : Map[String, Int]

    Python WEEK_START_DAY_TO_DOW: days of week to ISO 8601 day-of-week numbers (Monday=1, ..., Sunday=7).

    week_unit_to_dow

    fn week_unit_to_dow(unit : Expr?) -> Int?

    Python week_unit_to_dow(unit): the ISO 8601 week start day (Monday=1 .. Sunday=7) of a week-ish unit, e.g. BigQuery's WEEK() or ISOWEEK, or None if not a week unit or if the day is dynamic.

    weekstart_unit_to_str

    fn weekstart_unit_to_str(g : Generator, e : Expr, default? : String) -> Expr? raise SqlglotError

    Python weekstart_unit_to_str(self, expression, default="DAY").

    wrap_binary

    fn wrap_binary(e : Expr) -> Expr

    Wraps a binary operand in parentheses if needed (Python _wrap(e, Binary)).