Expand description
SQL Abstract Syntax Tree (AST) types
pub use table_constraints::CheckConstraint;pub use table_constraints::ForeignKeyConstraint;pub use table_constraints::FullTextOrSpatialConstraint;pub use table_constraints::IndexConstraint;pub use table_constraints::PrimaryKeyConstraint;pub use table_constraints::TableConstraint;pub use table_constraints::UniqueConstraint;
- comments
- Provides a representation of source code comments in parsed SQL code.
- helpers
- Helper modules for building and manipulating AST nodes.
- table_
constraints - SQL Abstract Syntax Tree (AST) types for table constraints
- Alter
Operator ALTER OPERATORstatement See https://www.postgresql.org/docs/current/sql-alteroperator.html- Alter
Operator Class ALTER OPERATOR CLASSstatement See https://www.postgresql.org/docs/current/sql-alteropclass.html- Alter
Operator Family ALTER OPERATOR FAMILYstatement See https://www.postgresql.org/docs/current/sql-alteropfamily.html- Alter
Policy - ALTER POLICY statement.
- Alter
Schema - An
ALTER SCHEMA(Statement::AlterSchema) statement. - Alter
Table - ALTER TABLE statement
- Alter
Type - An
ALTER TYPEstatement (Statement::AlterType) - Alter
Type AddValue - See AlterTypeOperation::AddValue
- Alter
Type Rename - See AlterTypeOperation::Rename
- Alter
Type Rename Value - See AlterTypeOperation::RenameValue
- Alter
User - Modifies the properties of a user
- Alter
User AddMfa Method Otp - Alter
User AddRole Delegation - Alter
User Modify MfaMethod - Alter
User Password - Alter
User Remove Role Delegation - Alter
User SetPolicy - Analyze
- ANALYZE statement
- Array
- Represents an Array Expression, either
ARRAY[..], or[..] - Assignment
- SQL assignment
foo = expras used in SQLUpdate - Begin
EndStatements - Represents a list of statements enclosed within
BEGINandENDkeywords. Example: - Case
Statement - A
CASEstatement. - Case
When - A WHEN clause in a CASE expression containing both the condition and its corresponding result
- Clustered
By - Hive supports
CLUSTERED BYstatement inCREATE TABLE. Syntax:CLUSTERED BY (col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS - Clustered
Index - A clustered index column specification.
- Column
Def - SQL column definition
- Column
Option Def - An optionally-named
ColumnOption:[ CONSTRAINT <name> ] <column-option>. - Column
Policy Property - Properties describing a column policy (masking or projection).
- Conditional
Statement Block - A block within a Statement::Case or Statement::If or Statement::While-like statement
- Constraint
Characteristics <constraint_characteristics> = [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] [ ENFORCED | NOT ENFORCED ]- Contact
Entry - Snowflake
WITH CONTACT ( purpose = contact [ , purpose = contact ...] ) - Create
Connector - Create
Domain - Create
Extension - CREATE EXTENSION statement Note: this is a PostgreSQL-specific statement
- Create
Function - CREATE FUNCTION statement
- Create
Index - CREATE INDEX statement.
- Create
Operator - CREATE OPERATOR statement See https://www.postgresql.org/docs/current/sql-createoperator.html
- Create
Operator Class - CREATE OPERATOR CLASS statement See https://www.postgresql.org/docs/current/sql-createopclass.html
- Create
Operator Family - CREATE OPERATOR FAMILY statement See https://www.postgresql.org/docs/current/sql-createopfamily.html
- Create
Policy - CREATE POLICY statement.
- Create
Role - CREATE ROLE statement See PostgreSQL
- Create
Server Option - A key/value option for
CREATE SERVER. - Create
Server Statement - A
CREATE SERVERstatement. - Create
Table - CREATE TABLE statement.
- Create
Table Like - Represents the
LIKEclause of aCREATE TABLEstatement. - Create
Trigger - CREATE TRIGGER
- Create
User - Creates a user
- Create
View - CREATE VIEW statement.
- Create
View Params - MySQL
CREATE VIEWadditional parameters - Cte
- A single CTE (used after
WITH):<alias> [(col1, col2, ...)] AS <materialized> ( <query> )The names in the column list beforeAS, when specified, replace the names of the columns returned by the query. The parser does not validate that the number of columns in the query matches the number of columns in the query. - Declare
- A
DECLAREstatement. PostgreSQL Snowflake BigQuery - Delete
- DELETE statement.
- Deny
Statement - A
DENYstatement - Dictionary
Field - A dictionary field within a dictionary.
- Display
Separated - Helper used to format a slice using a separator string (e.g.,
", "). - DoUpdate
- Details for
DO UPDATEaction of anON CONFLICTclause. - Dollar
Quoted String - A dollar-quoted string literal, e.g.
$$...$$or$tag$...$tag$. - Drop
Domain - A Drop Domain statement
- Drop
Extension - DROP EXTENSION statement Note: this is a PostgreSQL-specific statement
- Drop
Function - DROP FUNCTION statement
- Drop
Operator DROP OPERATORstatement See https://www.postgresql.org/docs/current/sql-dropoperator.html- Drop
Operator Class DROP OPERATOR CLASSstatement See https://www.postgresql.org/docs/current/sql-dropopclass.html- Drop
Operator Family DROP OPERATOR FAMILYstatement See https://www.postgresql.org/docs/current/sql-dropopfamily.html- Drop
Operator Signature - Operator signature for a
DROP OPERATORstatement - Drop
Policy - DROP POLICY statement.
- Drop
Trigger - DROP TRIGGER
- Except
Select Item - Bigquery
EXCEPTinformation, with at least one column. - Exception
When - A representation of a
WHENarm with all the identifiers catched and the statements to execute for the arm. - Export
Data - Represents an
EXPORT DATAstatement. - Expr
With Alias - An expression optionally followed by an alias.
- Expr
With Alias AndOrder By - An expression optionally followed by an alias and order by options.
- Fetch
FETCHclause options.- File
Size - Function
- A function call
- Function
Argument List - This represents everything inside the parentheses when calling a function.
- Function
Definition SetParam - A SET configuration_parameter clause in a CREATE FUNCTION statement.
- Function
Desc - Generic function description for DROP FUNCTION and CREATE TRIGGER.
- Grant
- GRANT privileges ON objects TO grantees
- Grantee
- The principal that receives the privileges
- Having
Bound - The
HAVINGclause in a call toANY_VALUEon BigQuery. - Hive
Format - Hive table format and storage-related options.
- Hive
Load Data Format - Format specification for
LOAD DATAHive operations. - Hive
RowDelimiter - A single row delimiter specification for Hive
ROW FORMAT. - Hive
SetLocation - Hive-specific
SET LOCATIONhelper used in someLOAD DATAstatements. - Ident
- An identifier, decomposed into its value or character data and the quote style.
- Ident
With Alias - Single aliased identifier
- Identity
Parameters - Parameters specifying seed and increment for identity columns.
- Identity
Property - Properties for the
IDENTITY/AUTOINCREMENTcolumn option. - IfStatement
- An
IFstatement. - Ilike
Select Item - Snowflake
ILIKEinformation. - Index
Column - Index column type.
- Input
Format Clause - FORMAT identifier in input context, specific to ClickHouse.
- Insert
- INSERT statement.
- Insert
Aliases - Optional aliases for
INSERTtargets: row alias and optional column aliases. - Interpolate
INTERPOLATEclause used with ClickHouseWITH FILLto compute missing values.- Interpolate
Expr - ClickHouse
INTERPOLATEclause for use inORDER BYclause when usingWITH FILLmodifier. Supported by ClickHouse syntax - Interval
- Represents an INTERVAL expression, roughly in the following format:
INTERVAL '<value>' [ <leading_field> [ (<leading_precision>) ] ] [ TO <last_field> [ (<fractional_seconds_precision>) ] ], e.g.INTERVAL '123:45.67' MINUTE(3) TO SECOND(2). - Join
- A single
JOINclause including relation and join operator/options. - Json
Path - A JSON path.
- Json
Returning Clause - PostgreSQL JSON function RETURNING clause
- Json
Table Named Column - A single column definition in MySQL’s
JSON_TABLEtable valued function. - Json
Table Nested Column - A nested column in a JSON_TABLE column list
- Lambda
Function - A lambda function.
- Lateral
View - A hive LATERAL VIEW with potential column aliases
- Lock
Clause FOR ...locking clause.- Lock
Table - Represents a
LOCK TABLEclause with optional alias and lock type. - Macro
Arg NAME = <EXPR>arguments for DuckDB macros- Map
- Represents a Map expression.
- MapEntry
- A map field within a map.
- Measure
- An item in the
MEASURESsubclause of aMATCH_RECOGNIZEoperation. - Member
Of - Checks membership of a value in a JSON array
- Merge
- A
MERGEstatement. - Merge
Clause - A
WHENclause within aMERGEStatement - Merge
Insert Expr - The expression used to insert rows within a
MERGEstatement. - Merge
Update Expr - The expression used to update rows within a
MERGEstatement. - Method
- A method call
- Msck
- An
MSCKstatement. - Named
Parenthesized List - Key/Value, where the value is a (optionally named) list of identifiers
- Named
Window Definition - A named window definition:
<name> AS <window specification> - Object
Name - A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj
- Object
Name Part Function - An object name part that consists of a function that dynamically constructs identifiers.
- Offset
OFFSETclause consisting of a value and a rows specifier.- OnConflict
ON CONFLICTclause representation.- OneOr
Many With Parens Into Iter - Owned iterator implementation of
OneOrManyWithParens - Open
Json Table Column - A single column definition in MSSQL’s
OPENJSON WITHclause. - Open
Statement - Represents an
OPENstatement. - Operate
Function Arg - Function argument in CREATE OR DROP FUNCTION.
- Operator
ArgTypes - Operator argument types for CREATE OPERATOR CLASS
- Optimizer
Hint - Query optimizer hints are optionally supported comments after the
SELECT,INSERT,UPDATE,REPLACE,MERGE, andDELETEkeywords in the corresponding statements. - OrderBy
- Represents an
ORDER BYclause with its kind and optionalINTERPOLATE. - Order
ByExpr - An
ORDER BYexpression - Order
ByOptions - Options for an
ORDER BYexpression (ASC/DESC and NULLS FIRST/LAST). - Print
Statement PRINTstatement for producing debug/output messages.- Procedure
Param - A parameter of a stored procedure or function declaration.
- Projection
Select - Query syntax for ClickHouse ADD PROJECTION statement.
Its syntax is similar to SELECT statement, but it is used to add a new projection to a table.
Syntax is
SELECT <COLUMN LIST EXPR> [GROUP BY] [ORDER BY] - Query
- The most complete variant of a
SELECTquery expression, optionally includingWITH,UNION/ other set operations, andORDER BY. - Quote
Delimited String - A quote delimited string literal, e.g.
Q'_abc_'. - Raise
Statement - A
RAISEstatement. - Rename
Table - rename object definition
- Replace
Select Element - Syntax
- Replace
Select Item - Bigquery
REPLACEinformation. - Reset
Statement - Resets a session parameter to its default value.
- Return
Statement - Represents a
Returnstatement. - Revoke
- REVOKE privileges ON objects FROM grantees
- RowAccess
Policy - Snowflake
WITH ROW ACCESS POLICY policy_name ON (identifier, ...) - Secret
Option - A key/value identifier pair used for secret or key-based options.
- Select
- A restricted variant of
SELECT(without CTEs/ORDER BY), which may appear either as the only body item of aQuery, or as an operand to a set operation likeUNION. - Select
Into SELECT INTOclause options.- Select
Modifiers - MySQL-specific SELECT modifiers that appear after the SELECT keyword.
- SetAssignment
- Assignment for a
SETstatement (name [=|TO] value) - SetSession
Authorization Param - Represents a SET SESSION AUTHORIZATION statement
- SetSession
Param Generic - Generic
SET SESSIONparameter represented as name(s) and value. - SetSession
Param Identity Insert IDENTITY_INSERTsession parameter for a specific object.- SetSession
Param Offsets - Offsets-related session parameter with keywords and a value.
- SetSession
Param Statistics - Statistics-related session parameter specifying topic and value.
- Setting
- A single setting key-value pair.
- Show
Charset - A Show Charset statement
- Show
Objects - Options for a
SHOW OBJECTSstatement. - Show
Statement In - Represents a
SHOW ... INclause with optional parent qualifier and name. - Show
Statement Options - Represents the different options available for
SHOWstatements to filter the results. Example from Snowflake: https://docs.snowflake.com/en/sql-reference/sql/show-tables - Struct
Field - A field definition within a struct
- Symbol
Definition - A symbol defined in a
MATCH_RECOGNIZEoperation. - Table
- A
TABLEcommand A (possibly schema-qualified) table reference used inFROMclauses. - Table
Alias - An alias for a table reference, optionally including an explicit
ASand column names. - Table
Alias Column Def - SQL column definition in a table expression alias. Most of the time, the data type is not specified. But some table-valued functions do require specifying the data type.
- Table
Function Args - Arguments to a table-valued function
- Table
Index Hints - MySQL-style index hints attached to a table (e.g.,
USE INDEX(...)). - Table
Sample - Represents a
TABLESAMPLEclause and its options. - Table
Sample Bucket - Bucket-based sampling clause:
BUCKET <bucket> OUT OF <total> [ON <expr>]. - Table
Sample Quantity - Quantity for a
TABLESAMPLEclause (e.g.10 PERCENTor(10)). - Table
Sample Seed SEEDorREPEATABLEclause used with sampling.- Table
With Joins - A left table followed by zero or more joins.
- Tablespace
Option - MySql TableSpace option https://dev.mysql.com/doc/refman/8.4/en/create-table.html
- Tag
- Snowflake
WITH TAG ( tag_name = '<tag_value>', ...) - Tags
Column Option - Tags option of column Syntax
- Top
- MSSQL
TOPclause options. - Trigger
Exec Body - This keyword immediately precedes the declaration of one or two relation names that provide access to the transition relations of the triggering statement
- Trigger
Referencing - This keyword immediately precedes the declaration of one or two relation names that provide access to the transition relations of the triggering statement
- Truncate
- A
TRUNCATEstatement. - Truncate
Table Target - Target of a
TRUNCATE TABLEcommand - Typed
String - A constant of form
<data_type> 'value'. This can represent ANSI SQLDATE,TIME, andTIMESTAMPliterals (such asDATE '2020-01-01'), as well as constants of other types (a non-standard PostgreSQL extension). - Union
Field - A field definition within a union
- Unload
Partition By - Specifies the partition keys for the unload operation
- Update
- UPDATE statement.
- User
Defined Type Composite Attribute Def - SQL user defined type attribute definition
- Utility
Option - Represents a single PostgreSQL utility option.
- Vacuum
Statement - Re-sorts rows and reclaims space in either a specified table or all tables in the current database
- Value
With Span - Wraps a primitive SQL
Valuewith itsSpanlocation - Values
- An explicit
VALUESclause and its rows. - View
Column Def - Column definition specified in a
CREATE VIEWstatement. - While
Statement - A
WHILEstatement. - Wildcard
Additional Options - Additional options for wildcards, e.g. Snowflake
EXCLUDE/RENAMEand BigqueryEXCEPT. - Window
Frame - Specifies the data processed by a window function, e.g.
RANGE UNBOUNDED PRECEDINGorROWS BETWEEN 5 PRECEDING AND CURRENT ROW. - Window
Spec - A window specification (i.e.
OVER ([window_name] PARTITION BY .. ORDER BY .. etc.)) - With
- A
WITHclause, introducing common table expressions (CTEs). - With
Fill - ClickHouse
WITH FILLmodifier forORDER BYclause. Supported by ClickHouse syntax - XmlNamespace
Definition - Represents a single XML namespace definition in the XMLNAMESPACES clause.
- XmlPassing
Argument - Argument passed in the XMLTABLE PASSING clause
Argument passed in the
XMLTABLE PASSINGclause. - XmlPassing
Clause - The PASSING clause for XMLTABLE
The PASSING clause for
XMLTABLE. - XmlTable
Column - A single column definition in XMLTABLE
- Access
Expr - An element of a
Expr::CompoundFieldAccess. It can be an expression or a subscript. - Action
- A privilege on a database object (table, sequence, etc.).
- Action
Apply Type - See https://docs.snowflake.com/en/sql-reference/sql/grant-privilege
under
globalPrivilegesin theAPPLYprivilege. - Action
Create Object Type - See https://docs.snowflake.com/en/sql-reference/sql/grant-privilege
under
globalPrivilegesin theCREATEprivilege. - Action
Execute Object Type - See https://docs.snowflake.com/en/sql-reference/sql/grant-privilege
under
globalPrivilegesin theEXECUTEprivilege. - Action
Manage Type - See https://docs.snowflake.com/en/sql-reference/sql/grant-privilege
under
globalPrivilegesin theMANAGEprivilege. - Action
Modify Type - See https://docs.snowflake.com/en/sql-reference/sql/grant-privilege
under
globalPrivilegesin theMODIFYprivilege. - Action
Monitor Type - See https://docs.snowflake.com/en/sql-reference/sql/grant-privilege
under
globalPrivilegesin theMONITORprivilege. - AddDrop
Sync - Indicates partition operation type for partition management statements.
- After
Match Skip - The after match skip option in a
MATCH_RECOGNIZEoperation. - Alignment
- Alignment specification for PostgreSQL user-defined base types.
- Alter
Column Operation - An
ALTER COLUMN(Statement::AlterTable) operation - Alter
Connector Owner - New connector owner specification for
ALTER CONNECTOR ... OWNER TO ... - Alter
Index Operation - Alterations that can be applied to an index.
- Alter
Operator Class Operation - An AlterOperatorClass operation
- Alter
Operator Family Operation - An AlterOperatorFamily operation
- Alter
Operator Operation - An AlterOperator operation
- Alter
Policy Operation - An
ALTER Policy(Statement::AlterPolicy) operation - Alter
Role Operation - An
ALTER ROLE(Statement::AlterRole) operation - Alter
Schema Operation - An
ALTER SCHEMA(Statement::AlterSchema) operation. - Alter
Table Algorithm - MySQL
ALTER TABLEalgorithm. - Alter
Table Lock - MySQL
ALTER TABLElock. - Alter
Table Operation - An
ALTER TABLE(Statement::AlterTable) operation - Alter
Table Type - Table type for ALTER TABLE statements. Used to distinguish between regular tables, Iceberg tables, and Dynamic tables.
- Alter
Type AddValue Position - See AlterTypeAddValue
- Alter
Type Operation - An AlterType operation
- Analyze
Format - Output formats supported for
ANALYZE/EXPLAIN ANALYZE. - Analyze
Format Kind - How the
ANALYZE/EXPLAIN ANALYZEformat is specified. - ArgMode
- The mode of an argument in CREATE FUNCTION.
- Array
Elem Type Def - Represents the data type of the elements in an array (if any) as well as the syntax used to declare the array.
- Assignment
Target - Left-hand side of an assignment in an UPDATE statement,
e.g.
fooinfoo = 5(ColumnName assignment) or(a, b)in(a, b) = (1, 2)(Tuple assignment). - Attach
DuckDB Database Option - Options supported by DuckDB for
ATTACH DATABASE. - Begin
Transaction Kind - Transaction started with [ TRANSACTION | WORK ]
- Binary
Length - Information about binary length, including length and possibly unit.
- Binary
Operator - Binary operators
- Cascade
Option - Cascade/restrict option for Postgres TRUNCATE table, MySQL GRANT/REVOKE, etc. [ CASCADE | RESTRICT ]
- Cast
Format - Options for
CAST/TRY_CASTBigQuery: https://cloud.google.com/bigquery/docs/reference/standard-sql/format-elements#formatting_syntax - Cast
Kind - The syntax used for in a cast expression.
- Catalog
Sync Namespace Mode - Snowflake CatalogSyncNamespaceMode
- Ceil
Floor Kind - The syntax used in a CEIL or FLOOR expression.
- Char
Length Units - Possible units for characters, initially based on 2016 ANSI SQL Standard.
- Character
Length - Information about character length, including length and possibly unit.
- Close
Cursor - Which cursor(s) to close.
- Column
Option ColumnOptions are modifiers that follow a column definition in aCREATE TABLEstatement.- Column
Options - Representation of how multiple
ColumnOptions are grouped for a column. - Column
Policy - Column policy that identify a security policy of access to a column. Syntax
- Comment
Def - Helper to indicate if a comment includes the
=in the display form - Comment
Object - Objects that can be targeted by a
COMMENTstatement. - Conditional
Statements - A list of statements in a ConditionalStatementBlock.
Statements used inside conditional blocks (
IF,WHEN,WHILE). - Conflict
Target - Target specification for an
ON CONFLICTclause. - Connect
ByKind - Joins a table to itself to process hierarchical data in the table.
- Constraint
Reference Match Kind MATCHtype for constraint references- Context
Modifier - Optional context modifier for statements that can be or
LOCAL,GLOBAL, orSESSION. - Copy
Into Snowflake Kind - Variants of the Snowflake
COPY INTOstatement - Copy
Legacy CsvOption - A
CSVoption inCOPYstatement before PostgreSQL version 9.0. - Copy
Legacy Option - An option in
COPYstatement before PostgreSQL version 9.0. - Copy
Option - An option in
COPYstatement. - Copy
Source - Source for the
COPYcommand: a table or a query. - Copy
Target - Target for the
COPYcommand: STDIN, STDOUT, a file, or a program. - Create
Function Body - Represent the expression body of a
CREATE FUNCTIONstatement as well as where within the statement, the body shows up. - Create
Function Using USINGclause options forCREATE FUNCTION(e.g., JAR, FILE, ARCHIVE).- Create
Policy Command - Command that a policy can apply to (FOR clause).
- Create
Policy Type - Policy type for a
CREATE POLICYstatement. - Create
Table Like Defaults - Controls whether defaults are included when creating a table FROM/LILE another.
- Create
Table Like Kind - Specifies how to create a new table based on an existing table’s schema. ‘’’sql CREATE TABLE new LIKE old … ‘’’
- Create
Table Options - Sql options of a
CREATE TABLEstatement. Options allowed within aCREATE TABLEstatement. - Create
View Algorithm - MySQL
CREATE VIEWalgorithm parameter: [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}] MySQLCREATE VIEWalgorithm options. - Create
View Security - MySQL
CREATE VIEWsecurity parameter: [SQL SECURITY { DEFINER | INVOKER }] MySQLCREATE VIEWSQL SECURITY options. - CteAs
Materialized - Indicates whether a CTE is materialized or not.
- Current
Grants Kind - Data
Type - SQL data types
- Date
Time Field - Represents the date/time fields used by functions like
EXTRACT. - Declare
Assignment - Represents an expression assignment within a variable
DECLAREstatement. - Declare
Type - Represents the type of a
DECLAREstatement. - Deduplicate
- DEDUPLICATE statement used in OPTIMIZE TABLE et al. such as in ClickHouse SQL ClickHouse
- Deferrable
Initial - Initial setting for deferrable constraints (
INITIALLY IMMEDIATEorINITIALLY DEFERRED). - Describe
Alias - Aliases accepted for describe-style commands.
- Discard
Object - Objects that can be discarded with
DISCARD. - Distinct
ALL,DISTINCT, orDISTINCT ON (...)modifiers forSELECTlists.- Drop
Behavior <drop behavior> ::= CASCADE | RESTRICT.- Drop
Function Option - Function describe in DROP FUNCTION.
- Duplicate
Treatment - How duplicate values are treated inside function argument lists.
- Empty
Matches Mode - The mode for handling empty matches in a
MATCH_RECOGNIZEoperation. - Enum
Member - A member of an ENUM type.
- Exact
Number Info - Additional information for
NUMERIC,DECIMAL, andDECdata types following the 2016 SQL Standard. - Exclude
Select Item - Snowflake
EXCLUDEinformation. - Expr
- An SQL expression of any type.
- Extract
Syntax EXTRACTsyntax variants.- Fetch
Direction - Specific direction for FETCH statement
- Fetch
Position - The “position” for a FETCH statement.
- File
Format - External table’s available file format
- File
Size Unit - Units for
FileSize(MB or GB). - Flush
Location - Location modifier for flush commands.
- Flush
Type - Types of flush operations supported by
FLUSH. - ForClause
FOR XMLorFOR JSONclause (MSSQL): formats the output of a query as XML or JSON.- ForJson
- Modes for
FOR JSONclause. - ForValues
- PostgreSQL partition bound specification for
PARTITION OF. - ForXml
- Modes for
FOR XMLclause. - Format
Clause FORMATidentifier orFORMAT NULLclause, specific to ClickHouse.- From
Table - A
FROMclause within aDELETEstatement. - Function
Arg - Forms of function arguments (named, expression-named, or positional).
- Function
ArgExpr - Expression forms allowed as a function argument.
- Function
ArgOperator - Operator used to separate function arguments
- Function
Argument Clause - Clauses that can appear inside a function argument list.
- Function
Arguments - The arguments passed to a function call.
- Function
Behavior - These attributes inform the query optimizer about the behavior of the function.
- Function
Called OnNull - These attributes describe the behavior of the function when called with a null argument.
- Function
Determinism Specifier - BigQuery Determinism specifier used in a UDF definition.
- Function
Parallel - If it is safe for PostgreSQL to call the function from multiple threads at once
- Function
Security - Security attribute for functions: SECURITY DEFINER or SECURITY INVOKER.
- Function
SetValue - Value for a SET configuration parameter in a CREATE FUNCTION statement.
- Generated
As GeneratedAss are modifiers that follow a column option in agenerated. ‘ExpStored’ is used for a column generated from an expression and stored.- Generated
Expression Mode GeneratedExpressionModes are modifiers that follow an expression in agenerated. No modifier is typically the same as Virtual.- Geometric
Type Kind - Represents different types of geometric shapes which are commonly used in PostgreSQL/Redshift for spatial operations and geometry-related computations.
- Grant
Objects - Objects on which privileges are granted in a GRANT statement.
- Grantee
Name - Users/roles designated in a GRANT/REVOKE
- Grantees
Type - The kind of principal receiving privileges.
- Group
ByExpr - Represents the two syntactic forms that
GROUP BYcan take, includingGROUP BY ALLwith optional modifiers and ordinaryGROUP BY <exprs>. - Group
ByWith Modifier - ClickHouse supports GROUP BY WITH modifiers(includes ROLLUP|CUBE|TOTALS). e.g. GROUP BY year WITH ROLLUP WITH TOTALS
- Having
Bound Kind - Which bound is used in a HAVING clause for ANY_VALUE on BigQuery.
- Hive
Delimiter - Kind of delimiter used in Hive
ROW FORMATdefinitions. - Hive
Describe Format - Describe output format options for Hive
DESCRIBE/EXPLAIN. - Hive
Distribution Style - Distribution style options for Hive tables.
- HiveIO
Format - Hive input/output format specification used in
CREATE TABLE. - Hive
RowFormat - Row format specification for Hive tables (SERDE or DELIMITED).
- IamRole
Kind - An
IAM_ROLEoption in the AWS ecosystem - Identity
Property Format Kind - A format of parameters of identity column.
- Identity
Property Kind - Identity is a column option for defining an identity or autoincrement column in a
CREATE TABLEstatement. Syntax - Identity
Property Order - The identity column option specifies how values are generated for the auto-incremented column, either in increasing or decreasing order. Syntax
- Index
Option - MySQL index option, used in
CREATE TABLE,CREATE INDEX, andALTER TABLE. - Index
Type - Indexing method used by that index.
- Initialize
Kind - Specifies the behavior of the initial refresh of the dynamic table.
- Interval
Fields - Fields for Postgres
INTERVALtype. - Join
Constraint - Represents how two tables are constrained in a join:
ON,USING,NATURAL, or none. - Join
Operator - The operator used for joining two tables, e.g.
INNER,LEFT,CROSS,ASOF, etc. - Json
Null Clause - MSSQL’s json null clause
- Json
Path Elem - An element of a JSON path.
- Json
Table Column - A single column definition in MySQL’s
JSON_TABLEtable valued function. - Json
Table Column Error Handling - Stores the error handling clause of a
JSON_TABLEtable valued function: {NULL | DEFAULT json_string | ERROR} ON {ERROR | EMPTY } Error/empty-value handling forJSON_TABLEcolumns. - KeyOr
Index Display - Representation whether a definition can can contains the KEY or INDEX keywords with the same meaning.
- Kill
Type - Types supported by
KILLstatements. - Lambda
Syntax - The syntax style for a lambda function.
- Limit
Clause - Represents the different syntactic forms of
LIMITclauses. - List
AggOn Overflow - The
ON OVERFLOWclause of a LISTAGG invocation - Lock
Table Type - The type of lock used in
LOCK TABLEstatements. - Lock
Type - The lock type used in
FOR <lock>clauses (e.g.FOR SHARE,FOR UPDATE). - Macro
Definition - Definition for a DuckDB macro: either an expression or a table-producing query.
- Match
Recognize Pattern - The pattern in a
MATCH_RECOGNIZEoperation. - Match
Recognize Symbol - A symbol in a
MATCH_RECOGNIZEpattern. - Merge
Action - Underlying statement of a
WHENclause within aMERGEStatement - Merge
Clause Kind - Variant of
WHENclause used within aMERGEStatement. - Merge
Insert Kind - The type of expression used to insert rows within a
MERGEstatement. - MfaMethod
Kind - Types of MFA methods
- MinMax
Value - Can use to describe options in create sequence or table column type identity [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
- MySQL
Column Position - MySQL
ALTER TABLEonly [FIRST | AFTER column_name] MySQLALTER TABLEcolumn position specifier:FIRSTorAFTER <column>. - Mysql
Insert Priority - Mysql specific syntax
- Named
Window Expr - An expression used in a named window declaration.
- NonBlock
- Non-blocking lock options for
FOR ...clauses. - Normalization
Form - The Unicode Standard defines four normalization forms, which are intended to eliminate certain distinctions between visually or functionally identical characters.
- Null
Inclusion - Specifies Include / Exclude NULL within UNPIVOT command.
For example
UNPIVOT (column1 FOR new_column IN (col3, col4, col5, col6)) - Null
Treatment - Specifies Ignore / Respect NULL within window functions.
For example
FIRST_VALUE(column2) IGNORE NULLS OVER (PARTITION BY column1)How NULL values are treated in certain window functions. - Nulls
Distinct Option - PostgreSQL unique index nulls handling option:
[ NULLS [ NOT ] DISTINCT ] - Object
Name Part - A single part of an ObjectName
- Object
Type - Types of database objects referenced by DDL statements.
- Offset
Rows - Stores the keyword after
OFFSET <number> - OnCommit
- Action to take
ON COMMITfor temporary tables. - OnConflict
Action - Action to perform when an
ON CONFLICTtarget is matched. - OnInsert
- Behavior to apply for
INSERTwhen a conflict occurs. - OneOr
Many With Parens - Encapsulates the common pattern in SQL where either one unparenthesized item
such as an identifier or expression is permitted, or multiple of the same
item in a parenthesized list. For accessing items regardless of the form,
OneOrManyWithParensimplementsDeref<Target = [T]>andIntoIterator, so you can call slice methods on it and iterate over items - Operator
Class Item - An item in a CREATE OPERATOR CLASS statement
- Operator
Family Drop Item - An item in an ALTER OPERATOR FAMILY DROP statement
- Operator
Family Item - An item in an ALTER OPERATOR FAMILY ADD statement
- Operator
Option - Option for
ALTER OPERATOR SEToperation - Operator
Purpose - Purpose of an operator in an operator class
- Optimizer
Hint Style - The commentary style of an optimizer hint
- Order
ByKind - The kind of
ORDER BYclause: eitherALLwith modifiers or a list of expressions. - Output
Clause - A
OUTPUTClause in the end of aMERGEStatement - Owner
- New owner specification for
ALTER TABLE ... OWNER TO ... - Partition
- PARTITION statement used in ALTER TABLE et al. such as in Hive and ClickHouse SQL. For example, ClickHouse’s OPTIMIZE TABLE supports syntax like PARTITION ID ‘partition_id’ and PARTITION expr. ClickHouse
- Partition
Bound Value - A value in a partition bound specification.
- Partition
Range Direction - Specifies which partition the boundary values on table partitioning belongs to.
- Password
- Password specification variants used in user-related statements.
- Pipe
Operator - Pipe syntax, first introduced in Google BigQuery. Example:
- Pivot
Value Source - The source of values in a
PIVOToperation. - Privileges
- Privileges granted in a GRANT statement or revoked in a REVOKE statement.
- Rais
Error Option RAISERRORoptions See https://learn.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-ver16#options- Raise
Statement Value - Represents the error value of a RaiseStatement.
- Referential
Action <referential_action> = { RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT }- Refresh
Mode Kind - Specifies the refresh mode for the dynamic table.
- Rename
Select Item - Snowflake
RENAMEinformation. - Rename
Table Name Kind RenameTableNameKindis the kind used in anALTER TABLE _ RENAMEstatement.- Repetition
Quantifier - Determines the minimum and maximum allowed occurrences of a pattern in a
MATCH_RECOGNIZEoperation. - Replica
Identity - ALTER TABLE operation REPLICA IDENTITY values See Postgres ALTER TABLE docs
- Reset
- Variants of the RESET statement
- Reset
Config - RESET config option:
- Return
Statement Value - Variants of a
RETURNstatement - Role
Option - An option in
ROLEstatement. - Rows
PerMatch - The rows per match option in a
MATCH_RECOGNIZEoperation. - Schema
Name - Schema possible naming variants (1).
- Search
Modifier - Fulltext search modifiers (1).
- Secondary
Roles - Snowflake
SECONDARY ROLESUSE variant See: https://docs.snowflake.com/en/sql-reference/sql/use-secondary-roles - Select
Flavor - What did this select look like?
- Select
Item - One item of the comma-separated list following
SELECT - Select
Item Qualified Wildcard Kind - Represents an expression behind a wildcard expansion in a projection. `SELECT T.* FROM T;
- Sequence
Options - Can use to describe options in create sequence or table column type identity
- Session
Param Stats Topic - Topics available for session statistics configuration.
- Session
Param Value - Value for a session boolean-like parameter (ON/OFF).
- Set
- Variants for the
SETfamily of statements. - SetConfig
Value - SET config value option:
- SetExpr
- A node in a tree, representing a “query body” expression, roughly:
SELECT ... [ {UNION|EXCEPT|INTERSECT} SELECT ...] - SetOperator
- A set operator for combining two
SetExprs. - SetQuantifier
- A quantifier for SetOperator.
- SetSession
Authorization Param Kind - Represents the parameter kind for SET SESSION AUTHORIZATION
- SetSession
Param Kind - Kind of session parameter being set by
SET SESSION. - Show
Create Object - Object kinds supported by
SHOW CREATEstatements. - Show
Statement Filter - Filter forms usable in SHOW statements.
- Show
Statement Filter Position - Where a
SHOWfilter appears relative to the main clause. - Show
Statement InClause - Clause types used with SHOW … IN/FROM.
- Show
Statement InParent Type - Parent object types usable with
SHOW ... IN <parent>clauses. - SqlOption
- SQL option syntax used in table and server definitions.
- Sqlite
OnConflict - Sqlite specific syntax
- Statement
- A top-level statement (SELECT, INSERT, CREATE, etc.)
- Storage
Serialization Policy - Snowflake StorageSerializationPolicy for Iceberg Tables
- Storage
Type - Storage type options for a tablespace.
- Struct
Bracket Kind - Type of brackets used for
STRUCTliterals. - Subscript
- The contents inside the
[and]in a subscript expression. - Table
Factor - A table name or a parenthesized subquery with an optional alias
- Table
Index Hint ForClause - Which clause the table index hint applies to.
- Table
Index Hint Type - Type of index hint (e.g.,
USE,IGNORE,FORCE). - Table
Index Type - The kind of index referenced by an index hint (e.g.
USE INDEX). - Table
Object - Represents the referenced table in an
INSERT INTOstatement - Table
Options Clustered - Clustered options used for
CREATE TABLEclustered/indexed storage. - Table
Sample Kind - The table sample modifier options
- Table
Sample Method - The table sample method names
Sampling method used by
TABLESAMPLE. - Table
Sample Modifier - Modifier specifying whether
SAMPLEorTABLESAMPLEkeyword was used. - Table
Sample Seed Modifier - Modifier specifying how the sample seed is applied.
- Table
Sample Unit - Unit used with a
TABLESAMPLEquantity (rows or percent). - Table
Version - Specifies a table version selection, e.g.
FOR SYSTEM_TIME AS OForAT(...). - Timezone
Info - Timestamp and Time data types information about TimeZone formatting.
- TopQuantity
- Quantity used in a
TOPclause: either an expression or a constant. - Transaction
Access Mode - Transaction access mode (READ ONLY / READ WRITE).
- Transaction
Isolation Level - Transaction isolation levels.
- Transaction
Mode - Mode for transactions: access mode or isolation level.
- Transaction
Modifier - Modifier for the transaction in the
BEGINsyntax - Trigger
Event - Used to describe trigger events
- Trigger
Exec Body Type - Types of trigger body execution body.
- Trigger
Object - This specifies whether the trigger function should be fired once for every row affected by the trigger event, or just once per SQL statement.
- Trigger
Object Kind - Whether the syntax used for the trigger object (ROW or STATEMENT) is
FORorFOR EACH. - Trigger
Period - Trigger period
- Trigger
Referencing Type - This clause indicates whether the following relation name is for the before-image transition relation or the after-image transition relation
- Trim
Where Field - The side on which
TRIMshould be applied. - Truncate
Identity Option - PostgreSQL identity option for TRUNCATE table [ RESTART IDENTITY | CONTINUE IDENTITY ]
- Unary
Operator - Unary operators
- Update
Table From Kind - The
FROMclause of anUPDATE TABLEstatement - Use
- A
USE(Statement::Use) operation - User
Defined Type Internal Length - Internal length specification for PostgreSQL user-defined base types.
- User
Defined Type Range Option - Options for PostgreSQL
CREATE TYPE ... AS RANGEstatement. - User
Defined Type Representation - SQL user defined type definition
- User
Defined Type SqlDefinition Option - Options for PostgreSQL
CREATE TYPE ... (<options>)statement (base type definition). - User
Defined Type Storage - Storage specification for PostgreSQL user-defined base types.
- User
Policy Kind - Types of user-based policies
- Value
- Primitive SQL values such as number and string
- Value
Table Mode - BigQuery supports ValueTables which have 2 modes:
SELECT [ALL | DISTINCT] AS STRUCTSELECT [ALL | DISTINCT] AS VALUE - Window
Frame Bound - Specifies WindowFrame’s
start_boundandend_bound - Window
Frame Units - Units used to describe the window frame scope.
- Window
Type - The type of a window used in
OVERclauses. - Wrapped
Collection - Helper to indicate if a collection should be wrapped by a symbol in the display form
- XmlTable
Column Option - Defines the options for an XmlTable column: Named or ForOrdinality
- Spanned
- Trait for AST nodes that have a source location information.
- Visit
- A type that can be visited by a
Visitor. SeeVisitorfor recursively visiting parsed SQL statements. - Visit
Mut - A type that can be visited by a
VisitorMut. SeeVisitorMutfor recursively visiting parsed SQL statements. - Visitor
- A visitor that can be used to walk an AST tree.
- Visitor
Mut - A visitor that can be used to mutate an AST tree.
- escape_
double_ quote_ string - Convenience wrapper for escaping strings for double-quoted literals (
"). - escape_
quoted_ string - Return a helper which formats
stringfor inclusion inside a quoted literal that usesquoteas the delimiter. - visit_
expressions - Invokes the provided closure on all expressions (e.g.
1 + 2) present inv - visit_
expressions_ mut - Invokes the provided closure iteratively with a mutable reference to all expressions
present in
v. - visit_
relations - Invokes the provided closure on all relations (e.g. table names) present in
v - visit_
relations_ mut - Invokes the provided closure with a mutable reference to all relations (e.g. table names)
present in
v. - visit_
statements - Invokes the provided closure iteratively with a mutable reference to all statements
present in
v(e.g.SELECT,CREATE TABLE, etc). - visit_
statements_ mut - Invokes the provided closure on all statements (e.g.
SELECT,CREATE TABLE, etc) present inv