Skip to main content

TrinoDialect

Struct TrinoDialect 

Source
pub struct TrinoDialect {}
Expand description

SQL dialect for Trino.

Trait Implementations§

Source§

impl Debug for TrinoDialect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Dialect for TrinoDialect

Source§

fn is_identifier_start(&self, ch: char) -> bool

Determine if a character is a valid start character for an unquoted identifier
Source§

fn is_identifier_part(&self, ch: char) -> bool

Determine if a character is a valid unquoted identifier character
§

fn dialect(&self) -> TypeId

Determine the TypeId of this dialect. Read more
§

fn is_delimited_identifier_start(&self, ch: char) -> bool

Determine if a character starts a quoted identifier. The default implementation, accepting “double quoted” ids is both ANSI-compliant and appropriate for most dialects (with the notable exception of MySQL, MS SQL, and sqlite). You can accept one of characters listed in Word::matching_end_quote here
§

fn is_nested_delimited_identifier_start(&self, _ch: char) -> bool

Determine if a character starts a potential nested quoted identifier. Example: RedShift supports the following quote styles to all mean the same thing: Read more
§

fn peek_nested_delimited_identifier_quotes( &self, _chars: Peekable<Chars<'_>>, ) -> Option<(char, Option<char>)>

Only applicable whenever [Self::is_nested_delimited_identifier_start] returns true If the next sequence of tokens potentially represent a nested identifier, then this method returns a tuple containing the outer quote style, and if present, the inner (nested) quote style. Read more
§

fn identifier_quote_style(&self, _identifier: &str) -> Option<char>

Return the character used to quote identifiers.
§

fn ordered_bind_placeholder_style(&self) -> Option<BindPlaceholderStyle>

Return the placeholder syntax this server accepts for ordered unnamed bind parameters. Read more
§

fn is_custom_operator_part(&self, _ch: char) -> bool

Most dialects do not have custom operators. Override this method to provide custom operators.
§

fn supports_string_literal_backslash_escape(&self) -> bool

Determine if the dialect supports escaping characters via ’' in string literals. Read more
§

fn supports_national_string_literal(&self) -> bool

Does the dialect tokenize N'...' as a national string literal? Read more
§

fn supports_literal_prefix_in_qualified_name(&self) -> bool

Treats literal prefixes immediately after . as unquoted identifiers. Read more
§

fn ignores_wildcard_escapes(&self) -> bool

Determine whether the dialect strips the backslash when escaping LIKE wildcards (%, _). Read more
§

fn supports_unicode_string_literal(&self) -> bool

Determine if the dialect supports string literals with U& prefix. This is used to specify Unicode code points in string literals. For example, in PostgreSQL, the following is a valid string literal: Read more
§

fn supports_filter_during_aggregation(&self) -> bool

Does the dialect support FILTER (WHERE expr) for aggregate queries?
§

fn supports_window_clause_named_window_reference(&self) -> bool

Returns true if the dialect supports referencing another named window within a window clause declaration. Read more
§

fn supports_within_after_array_aggregation(&self) -> bool

Returns true if the dialect supports ARRAY_AGG() [WITHIN GROUP (ORDER BY)] expressions. Otherwise, the dialect should expect an ORDER BY without the WITHIN GROUP clause, e.g. ANSI
§

fn supports_partition_by_after_order_by(&self) -> bool

Returns true if the dialect supports PARTITION BY appearing after ORDER BY in a CREATE TABLE statement (in addition to the standard placement before ORDER BY). Read more
§

fn supports_array_join_syntax(&self) -> bool

Returns true if the dialect supports ClickHouse-style ARRAY JOIN / LEFT ARRAY JOIN / INNER ARRAY JOIN syntax for unnesting arrays inline. Read more
§

fn supports_drop_group(&self) -> bool

Returns true if the dialect supports DROP GROUP. Read more
§

fn supports_alter_user_as_alter_role(&self) -> bool

Returns true if the dialect treats ALTER USER as a synonym for ALTER ROLE. Read more
§

fn supports_cte_materialization(&self) -> bool

Returns true if the dialect supports AS MATERIALIZED and AS NOT MATERIALIZED in a common table expression. Read more
§

fn supports_create_group(&self) -> bool

Returns true if the dialect supports CREATE GROUP. Read more
§

fn supports_create_role_if_not_exists(&self) -> bool

Returns true if CREATE ROLE accepts IF NOT EXISTS.
§

fn supports_group_by_expr(&self) -> bool

Returns true if the dialects supports group sets, roll up, or cube expressions.
§

fn supports_group_by_with_modifier(&self) -> bool

Returns true if the dialects supports GROUP BY modifiers prefixed by a WITH keyword. Example: GROUP BY value WITH ROLLUP.
§

fn supports_left_associative_joins_without_parens(&self) -> bool

Indicates whether the dialect supports left-associative join parsing by default when parentheses are omitted in nested joins. Read more
§

fn supports_outer_join_operator(&self) -> bool

Returns true if the dialect supports the (+) syntax for OUTER JOIN.
§

fn supports_cross_join_constraint(&self) -> bool

Returns true if the dialect supports a join specification on CROSS JOIN.
§

fn supports_comma_join_constraint(&self) -> bool

Returns true if the dialect supports ON/USING after a comma-joined table, e.g. SELECT * FROM t, u ON t.a = u.a. Read more
§

fn supports_connect_by(&self) -> bool

Returns true if the dialect supports CONNECT BY.
§

fn supports_execute_immediate(&self) -> bool

Returns true if the dialect supports EXECUTE IMMEDIATE statements.
§

fn supports_match_recognize(&self) -> bool

Returns true if the dialect supports the MATCH_RECOGNIZE operation.
§

fn supports_in_empty_list(&self) -> bool

Returns true if the dialect supports (NOT) IN () expressions
§

fn supports_in_unparenthesized_expr(&self) -> bool

Returns true if the dialect supports a bare expression as the right-hand side of IN, without a parenthesized list — as in x IN 'a'.
§

fn supports_global_in(&self) -> bool

Returns true if the dialect supports GLOBAL IN and GLOBAL NOT IN.
§

fn supports_in_table_expression(&self) -> bool

Returns true if the dialect supports a table name or table-valued function as the right-hand side of IN, e.g. x IN t, x IN schema.t, or x IN f(args). Read more
§

fn supports_start_transaction_modifier(&self) -> bool

Returns true if the dialect supports BEGIN {DEFERRED | IMMEDIATE | EXCLUSIVE | TRY | CATCH} [TRANSACTION] statements
§

fn supports_end_transaction_modifier(&self) -> bool

Returns true if the dialect supports END {TRY | CATCH} statements
§

fn supports_named_fn_args_with_eq_operator(&self) -> bool

Returns true if the dialect supports named arguments of the form FUN(a = '1', b = '2').
§

fn supports_named_fn_args_with_colon_operator(&self) -> bool

Returns true if the dialect supports named arguments of the form FUN(a : '1', b : '2').
§

fn supports_named_fn_args_with_assignment_operator(&self) -> bool

Returns true if the dialect supports named arguments of the form FUN(a := '1', b := '2').
§

fn supports_named_fn_args_with_rarrow_operator(&self) -> bool

Returns true if the dialect supports named arguments of the form FUN(a => '1', b => '2').
§

fn supports_named_fn_args_with_expr_name(&self) -> bool

Returns true if dialect supports argument name as arbitrary expression. e.g. FUN(LOWER('a'):'1', b:'2') Such function arguments are represented in the AST by the FunctionArg::ExprNamed variant, otherwise use the FunctionArg::Named variant (compatible reason).
§

fn supports_numeric_prefix(&self) -> bool

Returns true if the dialect supports identifiers starting with a numeric prefix such as tables named 59901_user_login
§

fn supports_tuple_element_access(&self) -> bool

Returns true if a period directly after an identifier starts a tuple element access such as t.1, instead of the number .1.
§

fn supports_numeric_literal_underscores(&self) -> bool

Returns true if the dialect supports numbers containing underscores, e.g. 10_000_000
§

fn supports_non_decimal_integer_literals(&self) -> bool

Returns true if the dialect supports integer literals in hexadecimal, octal and binary, e.g. 0x1F, 0o17 and 0b101, which then parse as numbers instead of 0x hexadecimal strings.
§

fn supports_window_function_null_treatment_arg(&self) -> bool

Returns true if the dialects supports specifying null treatment as part of a window function’s parameter list as opposed to after the parameter list. Read more
§

fn supports_dictionary_syntax(&self) -> bool

Returns true if the dialect supports defining structs or objects using a syntax like {'x': 1, 'y': 2, 'z': 3}.
§

fn support_map_literal_syntax(&self) -> bool

Returns true if the dialect supports defining object using the syntax like Map {1: 10, 2: 20}.
§

fn supports_lambda_functions(&self) -> bool

Returns true if the dialect supports lambda functions, for example: Read more
§

fn supports_lambda_keyword_syntax(&self) -> bool

Returns true if the dialect supports the LAMBDA keyword spelling of lambda functions, for example: Read more
§

fn supports_parenthesized_set_variables(&self) -> bool

Returns true if the dialect supports multiple variable assignment using parentheses in a SET variable declaration. Read more
§

fn supports_comma_separated_set_assignments(&self) -> bool

Returns true if the dialect supports multiple SET statements in a single statement. Read more
§

fn supports_update_order_by(&self) -> bool

Returns true if the dialect supports ORDER BY in UPDATE statements. Read more
§

fn supports_select_wildcard_except(&self) -> bool

Returns true if the dialect supports an EXCEPT clause following a wildcard in a select list. Read more
§

fn convert_type_before_value(&self) -> bool

Returns true if the dialect has a CONVERT function which accepts a type first and an expression second, e.g. CONVERT(varchar, 1)
§

fn supports_triple_quoted_string(&self) -> bool

Returns true if the dialect supports triple quoted string e.g. """abc"""
§

fn parse_prefix( &self, _parser: &mut Parser<'_>, ) -> Option<Result<Expr, ParserError>>

Dialect-specific prefix parser override
§

fn supports_approximate_percentile_disc(&self) -> bool

Does the dialect support the APPROXIMATE PERCENTILE_DISC function syntax? See https://docs.aws.amazon.com/redshift/latest/dg/r_APPROXIMATE_PERCENTILE_DISC.html
§

fn supports_trailing_commas(&self) -> bool

Does the dialect support trailing commas around the query?
§

fn supports_limit_comma(&self) -> bool

Does the dialect support parsing LIMIT 1, 2 as LIMIT 2 OFFSET 1?
§

fn supports_string_literal_concatenation(&self) -> bool

Returns true if the dialect supports concatenating of string literal Example: SELECT 'Hello ' "world" => SELECT 'Hello world'
§

fn supports_string_literal_concatenation_with_newline(&self) -> bool

Returns true if the dialect supports concatenating string literals with a newline. For example, the following statement would return true: Read more
§

fn supports_projection_trailing_commas(&self) -> bool

Does the dialect support trailing commas in the projection list?
§

fn supports_from_trailing_commas(&self) -> bool

Returns true if the dialect supports trailing commas in the FROM clause of a SELECT statement. Example: SELECT 1 FROM T, U, LIMIT 1
§

fn supports_column_definition_trailing_commas(&self) -> bool

Returns true if the dialect supports trailing commas in the column definitions list of a CREATE statement. Example: CREATE TABLE T (x INT, y TEXT,)
§

fn supports_object_name_double_dot_notation(&self) -> bool

Returns true if the dialect supports double dot notation for object names Read more
§

fn supports_struct_literal(&self) -> bool

Return true if the dialect supports the STRUCT literal Read more
§

fn supports_empty_projections(&self) -> bool

Return true if the dialect supports empty projections in SELECT statements Read more
§

fn supports_select_expr_star(&self) -> bool

Return true if the dialect supports wildcard expansion on arbitrary expressions in projections. Read more
§

fn supports_from_first_select(&self) -> bool

Return true if the dialect supports “FROM-first” selects. Read more
§

fn supports_from_first_insert(&self) -> bool

Return true if the dialect supports “FROM-first” inserts. Read more
§

fn supports_pipe_operator(&self) -> bool

Return true if the dialect supports pipe operator. Read more
§

fn supports_user_host_grantee(&self) -> bool

Does the dialect support MySQL-style 'user'@'host' grantee syntax?
§

fn supports_match_against(&self) -> bool

Does the dialect support the MATCH() AGAINST() syntax?
§

fn supports_select_wildcard_exclude(&self) -> bool

Returns true if the dialect supports an exclude option following a wildcard in the projection section. For example: SELECT * EXCLUDE col1 FROM tbl. Read more
§

fn supports_select_exclude(&self) -> bool

Returns true if the dialect supports an exclude option as the last item in the projection section, not necessarily after a wildcard. For example: SELECT *, c1, c2 EXCLUDE c3 FROM tbl Read more
§

fn supports_create_table_multi_schema_info_sources(&self) -> bool

Returns true if the dialect supports specifying multiple options in a CREATE TABLE statement for the structure of the new table. For example: CREATE TABLE t (a INT, b INT) AS SELECT 1 AS b, 2 AS a
§

fn supports_select_modifiers(&self) -> bool

Returns true if the dialect supports MySQL-specific SELECT modifiers like HIGH_PRIORITY, STRAIGHT_JOIN, SQL_SMALL_RESULT, etc. Read more
§

fn parse_infix( &self, _parser: &mut Parser<'_>, _expr: &Expr, _precedence: u8, ) -> Option<Result<Expr, ParserError>>

Dialect-specific infix parser override Read more
§

fn get_next_precedence( &self, _parser: &Parser<'_>, ) -> Option<Result<u8, ParserError>>

Dialect-specific precedence override Read more
§

fn get_next_precedence_default( &self, parser: &Parser<'_>, ) -> Result<u8, ParserError>

Get the precedence of the next token, looking at the full token stream. Read more
§

fn parse_statement( &self, _parser: &mut Parser<'_>, ) -> Option<Result<Statement, ParserError>>

Dialect-specific statement parser override Read more
§

fn parse_data_type( &self, _parser: &mut Parser<'_>, ) -> Option<Result<DataType, ParserError>>

Parses a dialect-specific type, leaving the cursor unchanged on None to use standard parsing.
§

fn parse_column_option( &self, _parser: &mut Parser<'_>, ) -> Result<Option<Result<Option<ColumnOption>, ParserError>>, ParserError>

Dialect-specific column option parser override Read more
§

fn prec_value(&self, prec: Precedence) -> u8

Decide the lexical Precedence of operators. Read more
§

fn prec_unknown(&self) -> u8

Returns the precedence when the precedence is otherwise unknown
§

fn between_low_bound_precedence(&self) -> u8

Precedence used to stop parsing the low bound expression of a BETWEEN predicate.
§

fn supports_comparison_in_between_low_bound(&self) -> bool

Returns true if the low bound of a BETWEEN predicate may end with one comparison, as in a BETWEEN b > 1 AND c, while IS, LIKE and BETWEEN still end the bound. Read more
§

fn describe_requires_table_keyword(&self) -> bool

Returns true if this dialect requires the TABLE keyword after DESCRIBE Read more
§

fn allow_extract_custom(&self) -> bool

Returns true if this dialect allows the EXTRACT function to words other than [Keyword].
§

fn allow_extract_single_quotes(&self) -> bool

Returns true if this dialect allows the EXTRACT function to use single quotes in the part being extracted.
§

fn supports_extract_comma_syntax(&self) -> bool

Returns true if this dialect supports the EXTRACT function with a comma separator instead of FROM. Read more
§

fn supports_subquery_as_function_arg(&self) -> bool

Returns true if this dialect supports a subquery passed to a function as the only argument without enclosing parentheses. Read more
§

fn supports_create_view_comment_syntax(&self) -> bool

Returns true if this dialect supports the COMMENT clause in CREATE VIEW statements using the COMMENT = 'comment' syntax. Read more
§

fn supports_data_type_collation(&self) -> bool

Returns true if a data type can carry a collation, including inside a nested type such as MAP<STRING COLLATE UTF8_BINARY, STRING>.
§

fn supports_array_typedef_without_element_type(&self) -> bool

Returns true if this dialect supports the ARRAY type without specifying an element type. Read more
§

fn supports_array_typedef_with_parentheses(&self) -> bool

Returns true if this dialect supports the ARRAY(element_type) syntax. Read more
§

fn supports_array_element_not_null(&self) -> bool

Returns true if this dialect supports NOT NULL on an element type in an ARRAY(element_type) definition.
§

fn supports_map_typedef_with_parentheses(&self) -> bool

Returns true if this dialect supports the MAP(key_type, value_type) syntax.
§

fn supports_map_value_not_null(&self) -> bool

Returns true if this dialect supports NOT NULL on the value type in a MAP(key_type, value_type) definition.
§

fn supports_parens_around_table_factor(&self) -> bool

Returns true if this dialect supports extra parentheses around lone table names or derived tables in the FROM clause. Read more
§

fn supports_values_as_table_factor(&self) -> bool

Returns true if this dialect supports VALUES as a table factor without requiring parentheses around the entire clause. Read more
§

fn supports_dollar_placeholder(&self) -> bool

Enables SQLite $ placeholders containing $ characters and disables dollar-quoted strings.
§

fn supports_dollar_as_money_prefix(&self) -> bool

Returns true if this dialect supports $ as a prefix for money literals e.g. SELECT $123.45 (SQL Server)
§

fn supports_create_index_with_clause(&self) -> bool

Does the dialect support with clause in create index statement? e.g. CREATE INDEX idx ON t WITH (key = value, key2)
§

fn supports_sql_option_without_value(&self) -> bool

Does the dialect accept an option named without a value, e.g. CREATE VIEW v WITH (security_barrier) AS SELECT 1? Read more
§

fn require_interval_qualifier(&self) -> bool

Whether INTERVAL expressions require units (called “qualifiers” in the ANSI SQL spec) to be specified, e.g. INTERVAL 1 DAY vs INTERVAL 1. Read more
§

fn is_interval_qualifier(&self, kw: Keyword) -> bool

Returns true if kw can start the qualifier of an INTERVAL value, e.g. DAY in INTERVAL '1' DAY.
§

fn supports_explain_with_utility_options(&self) -> bool

Returns true if the dialect supports EXPLAIN statements with utility options e.g. EXPLAIN (ANALYZE TRUE, BUFFERS TRUE) SELECT * FROM tbl;
§

fn supports_asc_desc_in_column_definition(&self) -> bool

Returns true if the dialect supports ASC and DESC in column definitions e.g. CREATE TABLE t (a INT ASC, b INT DESC);
§

fn supports_string_literal_column_names(&self) -> bool

Returns true if the dialect allows string literals as column names in CREATE TABLE. SQLite’s grammar rule nm ::= id | STRING | JOIN_KW permits this.
§

fn supports_factorial_operator(&self) -> bool

Returns true if the dialect supports a! expressions
§

fn supports_bitwise_shift_operators(&self) -> bool

Returns true if the dialect supports << and >> shift operators.
§

fn supports_nested_comments(&self) -> bool

Returns true if the dialect supports nested comments e.g. /* /* nested */ */
§

fn supports_hash_comment(&self) -> bool

Returns true if the dialect supports # as the start of a single line comment, e.g. SELECT 1 # comment
§

fn supports_copy_from_stdin_data(&self) -> bool

Returns true if the dialect supports inline data for COPY ... FROM STDIN, captured verbatim by the tokenizer.
§

fn requires_hash_comment_space(&self) -> bool

Returns true if # starts a single line comment only when followed by an ASCII space or !, so # comment and #! comment are comments but #comment is not.
§

fn supports_multiline_comment_hints(&self) -> bool

Returns true if the dialect supports optimizer hints in multiline comments e.g. /*!50110 KEY_BLOCK_SIZE = 1024*/
§

fn supports_unterminated_block_comments(&self) -> bool

Returns true if the dialect accepts an unterminated block comment at end of input e.g. SELECT 1 /* comment Read more
§

fn supports_eq_alias_assignment(&self) -> bool

Returns true if this dialect supports treating the equals operator = within a SelectItem as an alias assignment operator, rather than a boolean expression. For example: the following statements are equivalent for such a dialect: Read more
§

fn supports_try_convert(&self) -> bool

Returns true if this dialect supports the TRY_CONVERT function
§

fn supports_bang_not_operator(&self) -> bool

Returns true if the dialect supports !a syntax for boolean NOT expressions.
§

fn supports_listen_notify(&self) -> bool

Returns true if the dialect supports the LISTEN, UNLISTEN and NOTIFY statements
§

fn supports_exclude_constraint(&self) -> bool

Returns true if the dialect supports EXCLUDE table constraints, e.g. EXCLUDE USING gist (c WITH &&) in CREATE TABLE/ALTER TABLE. See https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-EXCLUDE.
§

fn supports_load_data(&self) -> bool

Returns true if the dialect supports the LOAD DATA statement
§

fn supports_load_extension(&self) -> bool

Returns true if the dialect supports the LOAD extension statement
§

fn supports_top_before_distinct(&self) -> bool

Returns true if this dialect expects the TOP option before the ALL/DISTINCT options in a SELECT statement.
§

fn supports_boolean_literals(&self) -> bool

Returns true if the dialect supports boolean literals (true and false). For example, in MSSQL these are treated as identifiers rather than boolean literals.
§

fn supports_show_like_before_in(&self) -> bool

Returns true if this dialect supports the LIKE 'pattern' option in a SHOW statement before the IN option
§

fn supports_comment_on(&self) -> bool

Returns true if this dialect supports the COMMENT statement
§

fn supports_create_table_select(&self) -> bool

Returns true if the dialect supports the CREATE TABLE SELECT statement
§

fn supports_create_proc_syntax(&self) -> bool

Returns true if this dialect supports PROC as an abbreviation for PROCEDURE in a CREATE statement.
§

fn supports_leading_comma_before_table_options(&self) -> bool

Returns true if the dialect accepts a comma-separated list of table-level options placed between the table name and the column-list parenthesis, e.g. Read more
§

fn supports_partiql(&self) -> bool

Returns true if the dialect supports PartiQL for querying semi-structured data https://partiql.org/index.html
§

fn supports_unpivot_expr(&self) -> bool

Returns true if the dialect supports object-unpivot table factors in the FROM clause. Read more
§

fn supports_constraint_keyword_without_name(&self) -> bool

Returns true if the dialect supports the CONSTRAINT keyword without a name in table constraint definitions. Read more
§

fn supports_key_column_option(&self) -> bool

Returns true if the dialect supports the KEY keyword as part of column-level constraints in a CREATE TABLE statement. Read more
§

fn supports_attach_partition_of(&self) -> bool

Returns true if the dialect supports attaching a table as a partition with ALTER TABLE ... ATTACH PARTITION name { FOR VALUES ... | DEFAULT }. Read more
§

fn supports_detach_partition_of(&self) -> bool

Returns true if the dialect supports detaching a partition with ALTER TABLE ... DETACH PARTITION name [ CONCURRENTLY | FINALIZE ]. Read more
§

fn supports_column_generic_options(&self) -> bool

Returns true if the dialect supports OPTIONS ( option 'value' [, ...] ) in a column definition. Read more
§

fn is_reserved_for_identifier(&self, kw: Keyword) -> bool

Returns true if the specified keyword is reserved and cannot be used as an identifier without special handling like quoting.
§

fn get_reserved_keywords_for_select_item_operator(&self) -> &[Keyword]

Returns reserved keywords that may prefix a select item expression e.g. SELECT CONNECT_BY_ROOT name FROM Tbl2 (Snowflake)
§

fn get_reserved_grantees_types(&self) -> &[GranteesType]

Returns grantee types that should be treated as identifiers
§

fn supports_table_sample_before_alias(&self) -> bool

Returns true if this dialect supports the TABLESAMPLE option before the table alias option. For example: Read more
§

fn supports_insert_set(&self) -> bool

Returns true if this dialect supports the INSERT INTO ... SET col1 = 1, ... syntax. Read more
§

fn supports_insert_table_function(&self) -> bool

Does the dialect support table function in insertion?
§

fn supports_insert_table_query(&self) -> bool

Does the dialect support table queries in insertion? Read more
§

fn supports_insert_format(&self) -> bool

Does the dialect support insert formats, e.g. INSERT INTO ... FORMAT <format>
§

fn supports_insert_table_alias(&self) -> bool

Returns true if this dialect supports INSERT INTO t [[AS] alias] ....
§

fn supports_singular_value_keyword(&self) -> bool

Returns true if the dialect accepts VALUE as a synonym of VALUES. Read more
§

fn supports_set_stmt_without_operator(&self) -> bool

Returns true if this dialect supports SET statements without an explicit assignment operator such as =. For example: SET SHOWPLAN_XML ON.
§

fn is_column_alias(&self, kw: &Keyword, _parser: &mut Parser<'_>) -> bool

Returns true if the specified keyword should be parsed as a column identifier. See [keywords::RESERVED_FOR_COLUMN_ALIAS]
§

fn is_select_item_alias( &self, explicit: bool, kw: &Keyword, parser: &mut Parser<'_>, ) -> bool

Returns true if the specified keyword should be parsed as a select item alias. When explicit is true, the keyword is preceded by an AS word. Parser is provided to enable looking ahead if needed.
§

fn supports_over_keyword_as_column_alias(&self) -> bool

Returns true if OVER without a following ( or plain-identifier window name may be used as an implicit column alias rather than starting a window clause. Read more
§

fn is_table_factor(&self, kw: &Keyword, _parser: &mut Parser<'_>) -> bool

Returns true if the specified keyword should be parsed as a table factor identifier. See [keywords::RESERVED_FOR_TABLE_FACTOR]
§

fn is_table_alias(&self, kw: &Keyword, _parser: &mut Parser<'_>) -> bool

Returns true if the specified keyword should be parsed as a table factor alias. See [keywords::RESERVED_FOR_TABLE_ALIAS]
§

fn is_table_factor_alias( &self, explicit: bool, kw: &Keyword, parser: &mut Parser<'_>, ) -> bool

Returns true if the specified keyword should be parsed as a table factor alias. When explicit is true, the keyword is preceded by an AS word. Parser is provided to enable looking ahead if needed.
§

fn supports_string_literal_column_alias(&self, _explicit: bool) -> bool

Returns true if a single-quoted string can name a select item, as in SELECT 1 AS 'x'. explicit is true when the alias follows AS. Read more
§

fn supports_string_literal_table_alias(&self, _explicit: bool) -> bool

Returns true if a single-quoted string can name a table, as in FROM t AS 'x'. explicit is true when the alias follows AS. Read more
§

fn supports_table_versioning(&self) -> bool

Returns true if this dialect supports querying historical table data by specifying which version of the data to query.
§

fn supports_string_escape_constant(&self) -> bool

Returns true if this dialect supports the E’…’ syntax for string literals Read more
§

fn supports_table_hints(&self) -> bool

Returns true if the dialect supports the table hints in the FROM clause.
§

fn supports_indexed_by(&self) -> bool

Returns true if the dialect supports SQLite’s INDEXED BY and NOT INDEXED index-selection clauses. Read more
§

fn requires_single_line_comment_whitespace(&self) -> bool

Returns true if this dialect requires a whitespace character after -- to start a single line comment. Read more
§

fn supports_array_typedef_with_brackets(&self) -> bool

Returns true if the dialect supports array type definition with brackets with an optional size. For example: CREATE TABLE my_table (arr1 INT[], arr2 INT[3]) SELECT x::INT[]
§

fn supports_geometric_types(&self) -> bool

Returns true if the dialect supports geometric types. Read more
§

fn supports_tilde_like_match_operator(&self) -> bool

Returns true if the dialect tokenizes ~~, ~~*, !~~ and !~~* as LIKE, ILIKE, NOT LIKE and NOT ILIKE pattern-match operators. Read more
§

fn supports_order_by_all(&self) -> bool

Returns true if the dialect supports ORDER BY ALL. ALL which means all columns of the SELECT clause. Read more
§

fn supports_order_by_using_operator(&self) -> bool

Returns true if the dialect supports PostgreSQL-style ordering operators: ORDER BY expr USING <operator>. Read more
§

fn supports_set_names(&self) -> bool

Returns true if the dialect supports SET NAMES <charset_name> [COLLATE <collation_name>]. Read more
§

fn supports_space_separated_column_options(&self) -> bool

Returns true if the dialect supports space-separated column options in a CREATE TABLE statement. For example: Read more
§

fn supports_alter_column_type_using(&self) -> bool

Returns true if the dialect supports the USING clause in an ALTER COLUMN statement. Example: Read more
§

fn supports_comma_separated_drop_column_list(&self) -> bool

Returns true if the dialect supports ALTER TABLE tbl DROP COLUMN c1, ..., cn
§

fn supports_alter_column_position(&self) -> bool

Returns true if the dialect supports a FIRST or AFTER col column position in ALTER TABLE ... ADD | CHANGE | MODIFY COLUMN. Example: Read more
§

fn supports_add_column_if_not_exists(&self) -> bool

Returns true if the dialect supports ALTER TABLE ... ADD [COLUMN] IF NOT EXISTS <col>. Example: Read more
§

fn is_identifier_generating_function_name( &self, _ident: &Ident, _name_parts: &[ObjectNamePart], ) -> bool

Returns true if the dialect considers the specified ident as a function that returns an identifier. Typically used to generate identifiers programmatically. Read more
§

fn supports_notnull_operator(&self) -> bool

Returns true if the dialect supports the x NOTNULL operator expression.
§

fn supports_is_operator(&self) -> bool

Returns true if the dialect supports binary IS and IS NOT operators. Read more
§

fn supports_data_type_signed_suffix(&self) -> bool

Returns true if this dialect allows an optional SIGNED suffix after integer data types. Read more
§

fn supports_data_type_zerofill_suffix(&self) -> bool

Returns true if this dialect allows an optional ZEROFILL suffix after numeric data types. Read more
§

fn supports_interval_options(&self) -> bool

Returns true if the dialect supports the INTERVAL data type with Postgres-style options. Read more
§

fn supports_create_table_like_parenthesized(&self) -> bool

Returns true if the dialect supports specifying which table to copy the schema from inside parenthesis. Read more
§

fn supports_semantic_view_table_factor(&self) -> bool

Returns true if the dialect supports SEMANTIC_VIEW() table functions. Read more
§

fn supports_stages(&self) -> bool

Returns true if this dialect supports Snowflake-style stages in table factors (e.g. @stage). Read more
§

fn supports_quote_delimited_string(&self) -> bool

Support quote delimited string literals, e.g. Q'{...}' Read more
§

fn supports_comment_optimizer_hint(&self) -> bool

Returns true if the dialect supports query optimizer hints in the format of single and multi line comments immediately following a SELECT, INSERT, REPLACE, DELETE, or MERGE keyword. Read more
§

fn supports_double_ampersand_operator(&self) -> bool

Returns true if the dialect considers the && operator as a boolean AND operator.
§

fn supports_binary_kw_as_cast(&self) -> bool

Returns true if the dialect supports casting an expression to a binary type using the BINARY <expr> syntax.
§

fn supports_select_wildcard_replace(&self) -> bool

Returns true if this dialect supports the REPLACE option in a SELECT * wildcard expression. Read more
§

fn supports_select_wildcard_ilike(&self) -> bool

Returns true if this dialect supports the ILIKE option in a SELECT * wildcard expression. Read more
§

fn supports_select_wildcard_rename(&self) -> bool

Returns true if this dialect supports the RENAME option in a SELECT * wildcard expression. Read more
§

fn supports_select_wildcard_with_alias(&self) -> bool

Returns true if this dialect supports aliasing a wildcard select item. Read more
§

fn supports_optimize_table(&self) -> bool

Returns true if this dialect supports the OPTIMIZE TABLE statement. Read more
§

fn supports_install(&self) -> bool

Returns true if this dialect supports the INSTALL statement. Read more
§

fn supports_detach(&self) -> bool

Returns true if this dialect supports the DETACH statement. Read more
§

fn supports_prewhere(&self) -> bool

Returns true if this dialect supports the PREWHERE clause in SELECT statements. Read more
§

fn supports_with_fill(&self) -> bool

Returns true if this dialect supports the WITH FILL clause in ORDER BY expressions. Read more
§

fn supports_limit_by(&self) -> bool

Returns true if this dialect supports the LIMIT BY clause. Read more
§

fn supports_interpolate(&self) -> bool

Returns true if this dialect supports the INTERPOLATE clause in ORDER BY expressions. Read more
§

fn supports_settings(&self) -> bool

Returns true if this dialect supports the SETTINGS clause. Read more
§

fn supports_table_partitions(&self) -> bool

Returns true if this dialect supports the PARTITION clause on a table factor, restricting a query to an explicit list of partitions. Read more
§

fn supports_table_inheritance_markers(&self) -> bool

Returns true if this dialect supports the ONLY and * table inheritance markers on a table factor. Read more
§

fn supports_select_format(&self) -> bool

Returns true if this dialect supports the FORMAT clause in SELECT statements. Read more
§

fn supports_comma_separated_trim(&self) -> bool

Returns true if the dialect supports the two-argument comma-separated form of the TRIM function: TRIM(expr, characters).
§

fn supports_cte_without_as(&self) -> bool

Returns true if the dialect supports the AS keyword being optional in a CTE definition. For example: Read more
§

fn supports_select_item_multi_column_alias(&self) -> bool

Returns true if the dialect supports parenthesized multi-column aliases in SELECT items. For example: Read more
§

fn supports_xml_expressions(&self) -> bool

Returns true if the dialect supports XML-related expressions such as xml '<foo/>' typed strings, XML functions like XMLCONCAT, XMLELEMENT, etc. Read more
§

fn is_custom_type_typed_string( &self, _first_keyword: Keyword, _qualified: bool, ) -> bool

Whether a custom type name may introduce a typed string.
§

fn supports_aliased_function_args(&self) -> bool

Returns true if the dialect supports aliased function arguments, e.g. XMLFOREST(a AS x) in PostgreSQL.
§

fn supports_create_table_using(&self) -> bool

Returns true if the dialect supports USING <format> in CREATE TABLE. Read more
§

fn supports_long_type_as_bigint(&self) -> bool

Returns true if the dialect treats LONG as an alias for BIGINT. Read more
§

fn supports_map_literal_with_angle_brackets(&self) -> bool

Returns true if the dialect supports MAP<K, V> angle-bracket syntax for the MAP data type. Read more
§

fn supports_double_eq_assignment(&self) -> bool

Returns true if the dialect accepts == as an alternative to = in UPDATE SET assignments. Read more
§

fn supports_cast_empty_data_type_to_unspecified(&self) -> bool

Returns true if the dialect supports CAST(expr AS) with an empty type name. Read more
§

fn supports_aggregate_order_by_with_empty_args(&self) -> bool

Returns true if the dialect allows an ORDER BY clause inside an aggregate function call with no preceding arguments, e.g. count(ORDER BY a). Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>, U: Sized,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

§

fn lift_into(self) -> U

Performs the indexed conversion.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> PlanCallbackArgs for T

§

impl<T> PlanCallbackOut for T

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more