Enum Statement

Source
pub enum Statement {
Show 100 variants Analyze { table_name: ObjectName, partitions: Option<Vec<Expr>>, for_columns: bool, columns: Vec<Ident>, cache_metadata: bool, noscan: bool, compute_statistics: bool, has_table_keyword: bool, }, Truncate { table_names: Vec<TruncateTableTarget>, partitions: Option<Vec<Expr>>, table: bool, only: bool, identity: Option<TruncateIdentityOption>, cascade: Option<CascadeOption>, on_cluster: Option<Ident>, }, Msck { table_name: ObjectName, repair: bool, partition_action: Option<AddDropSync>, }, Query(Box<Query>), Insert(Insert), Install { extension_name: Ident, }, Load { extension_name: Ident, }, Directory { overwrite: bool, local: bool, path: String, file_format: Option<FileFormat>, source: Box<Query>, }, Call(Function), Copy { source: CopySource, to: bool, target: CopyTarget, options: Vec<CopyOption>, legacy_options: Vec<CopyLegacyOption>, values: Vec<Option<String>>, }, CopyIntoSnowflake { into: ObjectName, from_stage: ObjectName, from_stage_alias: Option<Ident>, stage_params: StageParamsObject, from_transformations: Option<Vec<StageLoadSelectItem>>, files: Option<Vec<String>>, pattern: Option<String>, file_format: DataLoadingOptions, copy_options: DataLoadingOptions, validation_mode: Option<String>, }, Close { cursor: CloseCursor, }, Update { table: TableWithJoins, assignments: Vec<Assignment>, from: Option<UpdateTableFromKind>, selection: Option<Expr>, returning: Option<Vec<SelectItem>>, or: Option<SqliteOnConflict>, }, Delete(Delete), CreateView {
Show 13 fields or_replace: bool, materialized: bool, name: ObjectName, columns: Vec<ViewColumnDef>, query: Box<Query>, options: CreateTableOptions, cluster_by: Vec<Ident>, comment: Option<String>, with_no_schema_binding: bool, if_not_exists: bool, temporary: bool, to: Option<ObjectName>, params: Option<CreateViewParams>,
}, CreateTable(CreateTable), CreateVirtualTable { name: ObjectName, if_not_exists: bool, module_name: Ident, module_args: Vec<Ident>, }, CreateIndex(CreateIndex), CreateRole {
Show 18 fields names: Vec<ObjectName>, if_not_exists: bool, login: Option<bool>, inherit: Option<bool>, bypassrls: Option<bool>, password: Option<Password>, superuser: Option<bool>, create_db: Option<bool>, create_role: Option<bool>, replication: Option<bool>, connection_limit: Option<Expr>, valid_until: Option<Expr>, in_role: Vec<Ident>, in_group: Vec<Ident>, role: Vec<Ident>, user: Vec<Ident>, admin: Vec<Ident>, authorization_owner: Option<ObjectName>,
}, CreateSecret { or_replace: bool, temporary: Option<bool>, if_not_exists: bool, name: Option<Ident>, storage_specifier: Option<Ident>, secret_type: Ident, options: Vec<SecretOption>, }, CreatePolicy { name: Ident, table_name: ObjectName, policy_type: Option<CreatePolicyType>, command: Option<CreatePolicyCommand>, to: Option<Vec<Owner>>, using: Option<Expr>, with_check: Option<Expr>, }, AlterTable { name: ObjectName, if_exists: bool, only: bool, operations: Vec<AlterTableOperation>, location: Option<HiveSetLocation>, on_cluster: Option<Ident>, }, AlterIndex { name: ObjectName, operation: AlterIndexOperation, }, AlterView { name: ObjectName, columns: Vec<Ident>, query: Box<Query>, with_options: Vec<SqlOption>, }, AlterRole { name: Ident, operation: AlterRoleOperation, }, AlterPolicy { name: Ident, table_name: ObjectName, operation: AlterPolicyOperation, }, AttachDatabase { schema_name: Ident, database_file_name: Expr, database: bool, }, AttachDuckDBDatabase { if_not_exists: bool, database: bool, database_path: Ident, database_alias: Option<Ident>, attach_options: Vec<AttachDuckDBDatabaseOption>, }, DetachDuckDBDatabase { if_exists: bool, database: bool, database_alias: Ident, }, Drop { object_type: ObjectType, if_exists: bool, names: Vec<ObjectName>, cascade: bool, restrict: bool, purge: bool, temporary: bool, }, DropFunction { if_exists: bool, func_desc: Vec<FunctionDesc>, drop_behavior: Option<DropBehavior>, }, DropProcedure { if_exists: bool, proc_desc: Vec<FunctionDesc>, drop_behavior: Option<DropBehavior>, }, DropSecret { if_exists: bool, temporary: Option<bool>, name: Ident, storage_specifier: Option<Ident>, }, DropPolicy { if_exists: bool, name: Ident, table_name: ObjectName, drop_behavior: Option<DropBehavior>, }, Declare { stmts: Vec<Declare>, }, CreateExtension { name: Ident, if_not_exists: bool, cascade: bool, schema: Option<Ident>, version: Option<Ident>, }, DropExtension { names: Vec<Ident>, if_exists: bool, cascade_or_restrict: Option<ReferentialAction>, }, Fetch { name: Ident, direction: FetchDirection, into: Option<ObjectName>, }, Flush { object_type: FlushType, location: Option<FlushLocation>, channel: Option<String>, read_lock: bool, export: bool, tables: Vec<ObjectName>, }, Discard { object_type: DiscardObject, }, SetRole { context_modifier: ContextModifier, role_name: Option<Ident>, }, SetVariable { local: bool, hivevar: bool, variables: OneOrManyWithParens<ObjectName>, value: Vec<Expr>, }, SetTimeZone { local: bool, value: Expr, }, SetNames { charset_name: String, collation_name: Option<String>, }, SetNamesDefault {}, ShowFunctions { filter: Option<ShowStatementFilter>, }, ShowVariable { variable: Vec<Ident>, }, ShowStatus { filter: Option<ShowStatementFilter>, global: bool, session: bool, }, ShowVariables { filter: Option<ShowStatementFilter>, global: bool, session: bool, }, ShowCreate { obj_type: ShowCreateObject, obj_name: ObjectName, }, ShowColumns { extended: bool, full: bool, show_options: ShowStatementOptions, }, ShowDatabases { terse: bool, history: bool, show_options: ShowStatementOptions, }, ShowSchemas { terse: bool, history: bool, show_options: ShowStatementOptions, }, ShowTables { terse: bool, history: bool, extended: bool, full: bool, external: bool, show_options: ShowStatementOptions, }, ShowViews { terse: bool, materialized: bool, show_options: ShowStatementOptions, }, ShowCollation { filter: Option<ShowStatementFilter>, }, Use(Use), StartTransaction { modes: Vec<TransactionMode>, begin: bool, transaction: Option<BeginTransactionKind>, modifier: Option<TransactionModifier>, }, SetTransaction { modes: Vec<TransactionMode>, snapshot: Option<Value>, session: bool, }, Comment { object_type: CommentObject, object_name: ObjectName, comment: Option<String>, if_exists: bool, }, Commit { chain: bool, end: bool, modifier: Option<TransactionModifier>, }, Rollback { chain: bool, savepoint: Option<Ident>, }, CreateSchema { schema_name: SchemaName, if_not_exists: bool, }, CreateDatabase { db_name: ObjectName, if_not_exists: bool, location: Option<String>, managed_location: Option<String>, }, CreateFunction(CreateFunction), CreateTrigger {
Show 13 fields or_replace: bool, is_constraint: bool, name: ObjectName, period: TriggerPeriod, events: Vec<TriggerEvent>, table_name: ObjectName, referenced_table_name: Option<ObjectName>, referencing: Vec<TriggerReferencing>, trigger_object: TriggerObject, include_each: bool, condition: Option<Expr>, exec_body: TriggerExecBody, characteristics: Option<ConstraintCharacteristics>,
}, DropTrigger { if_exists: bool, trigger_name: ObjectName, table_name: ObjectName, option: Option<ReferentialAction>, }, CreateProcedure { or_alter: bool, name: ObjectName, params: Option<Vec<ProcedureParam>>, body: Vec<Statement>, }, CreateMacro { or_replace: bool, temporary: bool, name: ObjectName, args: Option<Vec<MacroArg>>, definition: MacroDefinition, }, CreateStage { or_replace: bool, temporary: bool, if_not_exists: bool, name: ObjectName, stage_params: StageParamsObject, directory_table_params: DataLoadingOptions, file_format: DataLoadingOptions, copy_options: DataLoadingOptions, comment: Option<String>, }, Assert { condition: Expr, message: Option<Expr>, }, Grant { privileges: Privileges, objects: GrantObjects, grantees: Vec<Grantee>, with_grant_option: bool, granted_by: Option<Ident>, }, Revoke { privileges: Privileges, objects: GrantObjects, grantees: Vec<Grantee>, granted_by: Option<Ident>, cascade: Option<CascadeOption>, }, Deallocate { name: Ident, prepare: bool, }, Execute { name: ObjectName, parameters: Vec<Expr>, has_parentheses: bool, using: Vec<Expr>, }, Prepare { name: Ident, data_types: Vec<DataType>, statement: Box<Statement>, }, Kill { modifier: Option<KillType>, id: u64, }, ExplainTable { describe_alias: DescribeAlias, hive_format: Option<HiveDescribeFormat>, has_table_keyword: bool, table_name: ObjectName, }, Explain { describe_alias: DescribeAlias, analyze: bool, verbose: bool, query_plan: bool, estimate: bool, statement: Box<Statement>, format: Option<AnalyzeFormat>, options: Option<Vec<UtilityOption>>, }, Savepoint { name: Ident, }, ReleaseSavepoint { name: Ident, }, Merge { into: bool, table: TableFactor, source: TableFactor, on: Box<Expr>, clauses: Vec<MergeClause>, }, Cache { table_flag: Option<ObjectName>, table_name: ObjectName, has_as: bool, options: Vec<SqlOption>, query: Option<Box<Query>>, }, UNCache { table_name: ObjectName, if_exists: bool, }, CreateSequence { temporary: bool, if_not_exists: bool, name: ObjectName, data_type: Option<DataType>, sequence_options: Vec<SequenceOptions>, owned_by: Option<ObjectName>, }, CreateType { name: ObjectName, representation: UserDefinedTypeRepresentation, }, Pragma { name: ObjectName, value: Option<Value>, is_eq: bool, }, LockTables { tables: Vec<LockTable>, }, UnlockTables, Unload { query: Box<Query>, to: Ident, with: Vec<SqlOption>, }, OptimizeTable { name: ObjectName, on_cluster: Option<Ident>, partition: Option<Partition>, include_final: bool, deduplicate: Option<Deduplicate>, }, LISTEN { channel: Ident, }, UNLISTEN { channel: Ident, }, NOTIFY { channel: Ident, payload: Option<String>, }, LoadData { local: bool, inpath: String, overwrite: bool, table_name: ObjectName, partitioned: Option<Vec<Expr>>, table_format: Option<HiveLoadDataFormat>, }, RenameTable(Vec<RenameTable>), List(FileStagingCommand), Remove(FileStagingCommand), SetSessionParam(SetSessionParamKind), RaisError { message: Box<Expr>, severity: Box<Expr>, state: Box<Expr>, arguments: Vec<Expr>, options: Vec<RaisErrorOption>, },
}
Expand description

A top-level statement (SELECT, INSERT, CREATE, etc.)

Variants§

§

Analyze

ANALYZE

Analyze (Hive)

Fields

§table_name: ObjectName
§partitions: Option<Vec<Expr>>
§for_columns: bool
§columns: Vec<Ident>
§cache_metadata: bool
§noscan: bool
§compute_statistics: bool
§has_table_keyword: bool
§

Truncate

TRUNCATE

Truncate (Hive)

Fields

§partitions: Option<Vec<Expr>>
§table: bool

TABLE - optional keyword;

§only: bool

Postgres-specific option [ TRUNCATE TABLE ONLY ]

§identity: Option<TruncateIdentityOption>

Postgres-specific option [ RESTART IDENTITY | CONTINUE IDENTITY ]

§cascade: Option<CascadeOption>

Postgres-specific option [ CASCADE | RESTRICT ]

§on_cluster: Option<Ident>

ClickHouse-specific option [ ON CLUSTER cluster_name ]

ClickHouse

§

Msck

MSCK

Msck (Hive)

Fields

§table_name: ObjectName
§repair: bool
§partition_action: Option<AddDropSync>
§

Query(Box<Query>)

SELECT
§

Insert(Insert)

INSERT
§

Install

INSTALL

Fields

§extension_name: Ident

Only for DuckDB

§

Load

LOAD

Fields

§extension_name: Ident

Only for DuckDB

§

Directory

Fields

§overwrite: bool
§local: bool
§path: String
§file_format: Option<FileFormat>
§source: Box<Query>
§

Call(Function)

CALL <function>
§

Copy

COPY [TO | FROM] ...

Fields

§source: CopySource

The source of ‘COPY TO’, or the target of ‘COPY FROM’

§to: bool

If true, is a ‘COPY TO’ statement. If false is a ‘COPY FROM’

§target: CopyTarget

The target of ‘COPY TO’, or the source of ‘COPY FROM’

§options: Vec<CopyOption>

WITH options (from PostgreSQL version 9.0)

§legacy_options: Vec<CopyLegacyOption>

WITH options (before PostgreSQL version 9.0)

§values: Vec<Option<String>>

VALUES a vector of values to be copied

§

CopyIntoSnowflake

COPY INTO

See https://docs.snowflake.com/en/sql-reference/sql/copy-into-table Copy Into syntax available for Snowflake is different than the one implemented in Postgres. Although they share common prefix, it is reasonable to implement them in different enums. This can be refactored later once custom dialects are allowed to have custom Statements.

Fields

§from_stage: ObjectName
§from_stage_alias: Option<Ident>
§stage_params: StageParamsObject
§from_transformations: Option<Vec<StageLoadSelectItem>>
§pattern: Option<String>
§copy_options: DataLoadingOptions
§validation_mode: Option<String>
§

Close

CLOSE

Closes the portal underlying an open cursor.

Fields

§cursor: CloseCursor

Cursor name

§

Update

UPDATE

Fields

§table: TableWithJoins

TABLE

§assignments: Vec<Assignment>

Column assignments

§from: Option<UpdateTableFromKind>

Table which provide value to be set

§selection: Option<Expr>

WHERE

§returning: Option<Vec<SelectItem>>

RETURNING

§or: Option<SqliteOnConflict>

SQLite-specific conflict resolution clause

§

Delete(Delete)

DELETE
§

CreateView

CREATE VIEW

Fields

§or_replace: bool
§materialized: bool
§name: ObjectName

View name

§query: Box<Query>
§cluster_by: Vec<Ident>
§comment: Option<String>

Snowflake: Views can have comments in Snowflake. https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax

§with_no_schema_binding: bool

if true, has RedShift [WITH NO SCHEMA BINDING] clause https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_VIEW.html

§if_not_exists: bool

if true, has SQLite IF NOT EXISTS clause https://www.sqlite.org/lang_createview.html

§temporary: bool

if true, has SQLite TEMP or TEMPORARY clause https://www.sqlite.org/lang_createview.html

§to: Option<ObjectName>

if not None, has Clickhouse TO clause, specify the table into which to insert results https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view

§params: Option<CreateViewParams>

MySQL: Optional parameters for the view algorithm, definer, and security context

§

CreateTable(CreateTable)

CREATE TABLE
§

CreateVirtualTable

CREATE VIRTUAL TABLE .. USING <module_name> (<module_args>)`

Sqlite specific statement

Fields

§if_not_exists: bool
§module_name: Ident
§module_args: Vec<Ident>
§

CreateIndex(CreateIndex)

`CREATE INDEX`
§

CreateRole

CREATE ROLE

See postgres

Fields

§if_not_exists: bool
§login: Option<bool>
§inherit: Option<bool>
§bypassrls: Option<bool>
§password: Option<Password>
§superuser: Option<bool>
§create_db: Option<bool>
§create_role: Option<bool>
§replication: Option<bool>
§connection_limit: Option<Expr>
§valid_until: Option<Expr>
§in_role: Vec<Ident>
§in_group: Vec<Ident>
§role: Vec<Ident>
§user: Vec<Ident>
§admin: Vec<Ident>
§authorization_owner: Option<ObjectName>
§

CreateSecret

CREATE SECRET

See duckdb

Fields

§or_replace: bool
§temporary: Option<bool>
§if_not_exists: bool
§storage_specifier: Option<Ident>
§secret_type: Ident
§

CreatePolicy

CREATE POLICY

See PostgreSQL

Fields

§name: Ident
§table_name: ObjectName
§using: Option<Expr>
§with_check: Option<Expr>
§

AlterTable

ALTER TABLE

Fields

§name: ObjectName

Table name

§if_exists: bool
§only: bool
§on_cluster: Option<Ident>

ClickHouse dialect supports ON CLUSTER clause for ALTER TABLE For example: ALTER TABLE table_name ON CLUSTER cluster_name ADD COLUMN c UInt32 ClickHouse

§

AlterIndex

ALTER INDEX

Fields

§

AlterView

ALTER VIEW

Fields

§name: ObjectName

View name

§columns: Vec<Ident>
§query: Box<Query>
§with_options: Vec<SqlOption>
§

AlterRole

ALTER ROLE

Fields

§name: Ident
§

AlterPolicy

ALTER POLICY <NAME> ON <TABLE NAME> [<OPERATION>]

(Postgresql-specific)

Fields

§name: Ident
§table_name: ObjectName
§

AttachDatabase

ATTACH DATABASE 'path/to/file' AS alias

(SQLite-specific)

Fields

§schema_name: Ident

The name to bind to the newly attached database

§database_file_name: Expr

An expression that indicates the path to the database file

§database: bool

true if the syntax is ‘ATTACH DATABASE’, false if it’s just ‘ATTACH’

§

AttachDuckDBDatabase

(DuckDB-specific)

ATTACH 'sqlite_file.db' AS sqlite_db (READ_ONLY, TYPE SQLITE);

See https://duckdb.org/docs/sql/statements/attach.html

Fields

§if_not_exists: bool
§database: bool

true if the syntax is ‘ATTACH DATABASE’, false if it’s just ‘ATTACH’

§database_path: Ident

An expression that indicates the path to the database file

§database_alias: Option<Ident>
§

DetachDuckDBDatabase

(DuckDB-specific)

DETACH db_alias;

See https://duckdb.org/docs/sql/statements/attach.html

Fields

§if_exists: bool
§database: bool

true if the syntax is ‘DETACH DATABASE’, false if it’s just ‘DETACH’

§database_alias: Ident
§

Drop

DROP [TABLE, VIEW, ...]

Fields

§object_type: ObjectType

The type of the object to drop: TABLE, VIEW, etc.

§if_exists: bool

An optional IF EXISTS clause. (Non-standard.)

§names: Vec<ObjectName>

One or more objects to drop. (ANSI SQL requires exactly one.)

§cascade: bool

Whether CASCADE was specified. This will be false when RESTRICT or no drop behavior at all was specified.

§restrict: bool

Whether RESTRICT was specified. This will be false when CASCADE or no drop behavior at all was specified.

§purge: bool

Hive allows you specify whether the table’s stored data will be deleted along with the dropped table

§temporary: bool

MySQL-specific “TEMPORARY” keyword

§

DropFunction

DROP FUNCTION

Fields

§if_exists: bool
§func_desc: Vec<FunctionDesc>

One or more function to drop

§drop_behavior: Option<DropBehavior>

CASCADE or RESTRICT

§

DropProcedure

DROP PROCEDURE

Fields

§if_exists: bool
§proc_desc: Vec<FunctionDesc>

One or more function to drop

§drop_behavior: Option<DropBehavior>

CASCADE or RESTRICT

§

DropSecret

DROP SECRET

Fields

§if_exists: bool
§temporary: Option<bool>
§name: Ident
§storage_specifier: Option<Ident>
§

DropPolicy

 DROP POLICY

See PostgreSQL

Fields

§if_exists: bool
§name: Ident
§table_name: ObjectName
§drop_behavior: Option<DropBehavior>
§

Declare

DECLARE

Declare Cursor Variables

Note: this is a PostgreSQL-specific statement, but may also compatible with other SQL.

Fields

§stmts: Vec<Declare>
§

CreateExtension

CREATE EXTENSION [ IF NOT EXISTS ] extension_name
    [ WITH ] [ SCHEMA schema_name ]
             [ VERSION version ]
             [ CASCADE ]

Note: this is a PostgreSQL-specific statement,

Fields

§name: Ident
§if_not_exists: bool
§cascade: bool
§schema: Option<Ident>
§version: Option<Ident>
§

DropExtension

DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

Note: this is a PostgreSQL-specific statement.
https://www.postgresql.org/docs/current/sql-dropextension.html

Fields

§names: Vec<Ident>
§if_exists: bool
§cascade_or_restrict: Option<ReferentialAction>

CASCADE or RESTRICT

§

Fetch

FETCH

Retrieve rows from a query using a cursor

Note: this is a PostgreSQL-specific statement, but may also compatible with other SQL.

Fields

§name: Ident

Cursor name

§direction: FetchDirection
§into: Option<ObjectName>

Optional, It’s possible to fetch rows form cursor to the table

§

Flush

FLUSH [NO_WRITE_TO_BINLOG | LOCAL] flush_option [, flush_option] ... | tables_option

Note: this is a Mysql-specific statement, but may also compatible with other SQL.

Fields

§object_type: FlushType
§channel: Option<String>
§read_lock: bool
§export: bool
§tables: Vec<ObjectName>
§

Discard

DISCARD [ ALL | PLANS | SEQUENCES | TEMPORARY | TEMP ]

Note: this is a PostgreSQL-specific statement, but may also compatible with other SQL.

Fields

§object_type: DiscardObject
§

SetRole

SET [ SESSION | LOCAL ] ROLE role_name

Sets session state. Examples: ANSI, Postgresql, MySQL, and Oracle

Fields

§context_modifier: ContextModifier

Non-ANSI optional identifier to inform if the role is defined inside the current session (SESSION) or transaction (LOCAL).

§role_name: Option<Ident>

Role name. If NONE is specified, then the current role name is removed.

§

SetVariable

SET <variable> = expression;
SET (variable[, ...]) = (expression[, ...]);

Note: this is not a standard SQL statement, but it is supported by at least MySQL and PostgreSQL. Not all MySQL-specific syntactic forms are supported yet.

Fields

§local: bool
§hivevar: bool
§value: Vec<Expr>
§

SetTimeZone

SET TIME ZONE <value>

Note: this is a PostgreSQL-specific statements SET TIME ZONE <value> is an alias for SET timezone TO <value> in PostgreSQL

Fields

§local: bool
§value: Expr
§

SetNames

SET NAMES 'charset_name' [COLLATE 'collation_name']

Note: this is a MySQL-specific statement.

Fields

§charset_name: String
§collation_name: Option<String>
§

SetNamesDefault

SET NAMES DEFAULT

Note: this is a MySQL-specific statement.

§

ShowFunctions

SHOW FUNCTIONS

Note: this is a Presto-specific statement.

§

ShowVariable

SHOW <variable>

Note: this is a PostgreSQL-specific statement.

Fields

§variable: Vec<Ident>
§

ShowStatus

SHOW [GLOBAL | SESSION] STATUS [LIKE 'pattern' | WHERE expr]

Note: this is a MySQL-specific statement.

Fields

§global: bool
§session: bool
§

ShowVariables

SHOW VARIABLES

Note: this is a MySQL-specific statement.

Fields

§global: bool
§session: bool
§

ShowCreate

SHOW CREATE TABLE

Note: this is a MySQL-specific statement.

Fields

§obj_name: ObjectName
§

ShowColumns

SHOW COLUMNS

Fields

§extended: bool
§full: bool
§

ShowDatabases

SHOW DATABASES

Fields

§terse: bool
§history: bool
§

ShowSchemas

SHOW SCHEMAS

Fields

§terse: bool
§history: bool
§

ShowTables

SHOW TABLES

Fields

§terse: bool
§history: bool
§extended: bool
§full: bool
§external: bool
§

ShowViews

SHOW VIEWS

Fields

§terse: bool
§materialized: bool
§

ShowCollation

SHOW COLLATION

Note: this is a MySQL-specific statement.

§

Use(Use)

`USE ...`
§

StartTransaction

START  [ TRANSACTION | WORK ] | START TRANSACTION } ...

If begin is false.

`BEGIN  [ TRANSACTION | WORK ] | START TRANSACTION } ...`

If begin is true

§

SetTransaction

SET TRANSACTION ...

Fields

§snapshot: Option<Value>
§session: bool
§

Comment

COMMENT ON ...

Note: this is a PostgreSQL-specific statement.

Fields

§object_type: CommentObject
§object_name: ObjectName
§comment: Option<String>
§if_exists: bool

An optional IF EXISTS clause. (Non-standard.) See https://docs.snowflake.com/en/sql-reference/sql/comment

§

Commit

COMMIT [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]

If end is false

END [ TRY | CATCH ]

If end is true

Fields

§chain: bool
§end: bool
§

Rollback

ROLLBACK [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ] [ TO [ SAVEPOINT ] savepoint_name ]

Fields

§chain: bool
§savepoint: Option<Ident>
§

CreateSchema

CREATE SCHEMA

Fields

§schema_name: SchemaName

<schema name> | AUTHORIZATION <schema authorization identifier> | <schema name> AUTHORIZATION <schema authorization identifier>

§if_not_exists: bool
§

CreateDatabase

CREATE DATABASE

Fields

§db_name: ObjectName
§if_not_exists: bool
§location: Option<String>
§managed_location: Option<String>
§

CreateFunction(CreateFunction)

CREATE FUNCTION

Supported variants:

  1. Hive
  2. Postgres
  3. BigQuery
§

CreateTrigger

CREATE TRIGGER

Examples:

CREATE TRIGGER trigger_name
BEFORE INSERT ON table_name
FOR EACH ROW
EXECUTE FUNCTION trigger_function();

Postgres: https://www.postgresql.org/docs/current/sql-createtrigger.html

Fields

§or_replace: bool

The OR REPLACE clause is used to re-create the trigger if it already exists.

Example:

CREATE OR REPLACE TRIGGER trigger_name
AFTER INSERT ON table_name
FOR EACH ROW
EXECUTE FUNCTION trigger_function();
§is_constraint: bool

The CONSTRAINT keyword is used to create a trigger as a constraint.

§name: ObjectName

The name of the trigger to be created.

§period: TriggerPeriod

Determines whether the function is called before, after, or instead of the event.

Example of BEFORE:

CREATE TRIGGER trigger_name
BEFORE INSERT ON table_name
FOR EACH ROW
EXECUTE FUNCTION trigger_function();

Example of AFTER:

CREATE TRIGGER trigger_name
AFTER INSERT ON table_name
FOR EACH ROW
EXECUTE FUNCTION trigger_function();

Example of INSTEAD OF:

CREATE TRIGGER trigger_name
INSTEAD OF INSERT ON table_name
FOR EACH ROW
EXECUTE FUNCTION trigger_function();
§events: Vec<TriggerEvent>

Multiple events can be specified using OR, such as INSERT, UPDATE, DELETE, or TRUNCATE.

§table_name: ObjectName

The table on which the trigger is to be created.

§referenced_table_name: Option<ObjectName>

The optional referenced table name that can be referenced via the FROM keyword.

§referencing: Vec<TriggerReferencing>

This keyword immediately precedes the declaration of one or two relation names that provide access to the transition relations of the triggering statement.

§trigger_object: TriggerObject

This specifies whether the trigger function should be fired once for every row affected by the trigger event, or just once per SQL statement.

§include_each: bool

Whether to include the EACH term of the FOR EACH, as it is optional syntax.

§condition: Option<Expr>

Triggering conditions

§exec_body: TriggerExecBody

Execute logic block

§characteristics: Option<ConstraintCharacteristics>

The characteristic of the trigger, which include whether the trigger is DEFERRABLE, INITIALLY DEFERRED, or INITIALLY IMMEDIATE,

§

DropTrigger

DROP TRIGGER

DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]

Fields

§if_exists: bool
§trigger_name: ObjectName
§table_name: ObjectName
§option: Option<ReferentialAction>

CASCADE or RESTRICT

§

CreateProcedure

CREATE PROCEDURE

Fields

§or_alter: bool
§

CreateMacro

CREATE MACRO

Supported variants:

  1. DuckDB

Fields

§or_replace: bool
§temporary: bool
§definition: MacroDefinition
§

CreateStage

Fields

§or_replace: bool
§temporary: bool
§if_not_exists: bool
§stage_params: StageParamsObject
§directory_table_params: DataLoadingOptions
§copy_options: DataLoadingOptions
§comment: Option<String>
§

Assert

ASSERT <condition> [AS <message>]

Fields

§condition: Expr
§message: Option<Expr>
§

Grant

GRANT privileges ON objects TO grantees

Fields

§privileges: Privileges
§grantees: Vec<Grantee>
§with_grant_option: bool
§granted_by: Option<Ident>
§

Revoke

REVOKE privileges ON objects FROM grantees

Fields

§privileges: Privileges
§grantees: Vec<Grantee>
§granted_by: Option<Ident>
§

Deallocate

DEALLOCATE [ PREPARE ] { name | ALL }

Note: this is a PostgreSQL-specific statement.

Fields

§name: Ident
§prepare: bool
§

Execute

EXECUTE name [ ( parameter [, ...] ) ] [USING <expr>]

Note: this statement is supported by Postgres and MSSQL, with slight differences in syntax.

Postgres: https://www.postgresql.org/docs/current/sql-execute.html MSSQL: https://learn.microsoft.com/en-us/sql/relational-databases/stored-procedures/execute-a-stored-procedure

Fields

§parameters: Vec<Expr>
§has_parentheses: bool
§using: Vec<Expr>
§

Prepare

PREPARE name [ ( data_type [, ...] ) ] AS statement

Note: this is a PostgreSQL-specific statement.

Fields

§name: Ident
§data_types: Vec<DataType>
§statement: Box<Statement>
§

Kill

Fields

§modifier: Option<KillType>
§id: u64
§

ExplainTable

[EXPLAIN | DESC | DESCRIBE] TABLE

Note: this is a MySQL-specific statement. See https://dev.mysql.com/doc/refman/8.0/en/explain.html

Fields

§describe_alias: DescribeAlias

EXPLAIN | DESC | DESCRIBE

§hive_format: Option<HiveDescribeFormat>

Hive style FORMATTED | EXTENDED

§has_table_keyword: bool

Snowflake and ClickHouse support DESC|DESCRIBE TABLE <table_name> syntax

Snowflake ClickHouse

§table_name: ObjectName

Table name

§

Explain

[EXPLAIN | DESC | DESCRIBE]  <statement>

Fields

§describe_alias: DescribeAlias

EXPLAIN | DESC | DESCRIBE

§analyze: bool

Carry out the command and show actual run times and other statistics.

§verbose: bool
§query_plan: bool

EXPLAIN QUERY PLAN Display the query plan without running the query.

SQLite

§estimate: bool

EXPLAIN ESTIMATE Clickhouse

§statement: Box<Statement>

A SQL query that specifies what to explain

§format: Option<AnalyzeFormat>

Optional output format of explain

§options: Option<Vec<UtilityOption>>

Postgres style utility options, (analyze, verbose true)

§

Savepoint

SAVEPOINT

Define a new savepoint within the current transaction

Fields

§name: Ident
§

ReleaseSavepoint

RELEASE [ SAVEPOINT ] savepoint_name

Fields

§name: Ident
§

Merge

A MERGE statement.

MERGE INTO <target_table> USING <source> ON <join_expr> { matchedClause | notMatchedClause } [ ... ]

Snowflake BigQuery

Fields

§into: bool

optional INTO keyword

§table: TableFactor

Specifies the table to merge

§source: TableFactor

Specifies the table or subquery to join with the target table

§on: Box<Expr>

Specifies the expression on which to join the target table and source

§clauses: Vec<MergeClause>

Specifies the actions to perform when values match or do not match.

§

Cache

CACHE [ FLAG ] TABLE <table_name> [ OPTIONS('K1' = 'V1', 'K2' = V2) ] [ AS ] [ <query> ]

See Spark SQL docs for more details.

Fields

§table_flag: Option<ObjectName>

Table flag

§table_name: ObjectName

Table name

§has_as: bool
§options: Vec<SqlOption>

Table confs

§query: Option<Box<Query>>

Cache table as a Query

§

UNCache

UNCACHE TABLE [ IF EXISTS ]  <table_name>

Fields

§table_name: ObjectName

Table name

§if_exists: bool
§

CreateSequence

CREATE [ { TEMPORARY | TEMP } ] SEQUENCE [ IF NOT EXISTS ] <sequence_name>

Define a new sequence:

Fields

§temporary: bool
§if_not_exists: bool
§data_type: Option<DataType>
§sequence_options: Vec<SequenceOptions>
§owned_by: Option<ObjectName>
§

CreateType

CREATE TYPE <name>
§

Pragma

PRAGMA <schema-name>.<pragma-name> = <pragma-value>

Fields

§value: Option<Value>
§is_eq: bool
§

LockTables

LOCK TABLES <table_name> [READ [LOCAL] | [LOW_PRIORITY] WRITE]

Note: this is a MySQL-specific statement. See https://dev.mysql.com/doc/refman/8.0/en/lock-tables.html

Fields

§tables: Vec<LockTable>
§

UnlockTables

UNLOCK TABLES

Note: this is a MySQL-specific statement. See https://dev.mysql.com/doc/refman/8.0/en/lock-tables.html

§

Unload

UNLOAD(statement) TO <destination> [ WITH options ]

See Redshift https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html and

Fields

§query: Box<Query>
§

OptimizeTable

OPTIMIZE TABLE [db.]name [ON CLUSTER cluster] [PARTITION partition | PARTITION ID 'partition_id'] [FINAL] [DEDUPLICATE [BY expression]]

See ClickHouse https://clickhouse.com/docs/en/sql-reference/statements/optimize

Fields

§on_cluster: Option<Ident>
§partition: Option<Partition>
§include_final: bool
§deduplicate: Option<Deduplicate>
§

LISTEN

LISTEN

listen for a notification channel

See Postgres https://www.postgresql.org/docs/current/sql-listen.html

Fields

§channel: Ident
§

UNLISTEN

UNLISTEN

stop listening for a notification

See Postgres https://www.postgresql.org/docs/current/sql-unlisten.html

Fields

§channel: Ident
§

NOTIFY

NOTIFY channel [ , payload ]

send a notification event together with an optional “payload” string to channel

See Postgres https://www.postgresql.org/docs/current/sql-notify.html

Fields

§channel: Ident
§payload: Option<String>
§

LoadData

LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename
[PARTITION (partcol1=val1, partcol2=val2 ...)]
[INPUTFORMAT 'inputformat' SERDE 'serde']

Loading files into tables

See Hive https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27362036#LanguageManualDML-Loadingfilesintotables

Fields

§local: bool
§inpath: String
§overwrite: bool
§table_name: ObjectName
§partitioned: Option<Vec<Expr>>
§

RenameTable(Vec<RenameTable>)

Rename TABLE tbl_name TO new_tbl_name[, tbl_name2 TO new_tbl_name2] ...

Renames one or more tables

See Mysql https://dev.mysql.com/doc/refman/9.1/en/rename-table.html

§

List(FileStagingCommand)

§

Remove(FileStagingCommand)

§

SetSessionParam(SetSessionParamKind)

§

RaisError

RaiseError (MSSQL) RAISERROR ( { msg_id | msg_str | @local_variable } { , severity , state } [ , argument [ , …n ] ] ) [ WITH option [ , …n ] ] See https://learn.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-ver16

Fields

§message: Box<Expr>
§severity: Box<Expr>
§state: Box<Expr>
§arguments: Vec<Expr>

Trait Implementations§

Source§

impl Clone for Statement

Source§

fn clone(&self) -> Statement

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Statement

Source§

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

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

impl Display for Statement

Source§

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

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

impl Hash for Statement

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Statement

Source§

fn cmp(&self, other: &Statement) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Statement

Source§

fn eq(&self, other: &Statement) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Statement

Source§

fn partial_cmp(&self, other: &Statement) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Spanned for Statement

§partial span

Missing spans:

Source§

fn span(&self) -> Span

Return the Span (the minimum and maximum Location) for this AST node, by recursively combining the spans of its children.
Source§

impl TryFrom<Statement> for CreateTableBuilder

Source§

type Error = ParserError

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

fn try_from( stmt: Statement, ) -> Result<CreateTableBuilder, <CreateTableBuilder as TryFrom<Statement>>::Error>

Performs the conversion.
Source§

impl Visit for Statement

Source§

fn visit<V>(&self, visitor: &mut V) -> ControlFlow<<V as Visitor>::Break>
where V: Visitor,

Source§

impl VisitMut for Statement

Source§

fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>
where V: VisitorMut,

Source§

impl Eq for Statement

Source§

impl StructuralPartialEq for Statement

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AlignerFor<1> for T

Source§

type Aligner = AlignTo1<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<1024> for T

Source§

type Aligner = AlignTo1024<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<128> for T

Source§

type Aligner = AlignTo128<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<16> for T

Source§

type Aligner = AlignTo16<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<16384> for T

Source§

type Aligner = AlignTo16384<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<2> for T

Source§

type Aligner = AlignTo2<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<2048> for T

Source§

type Aligner = AlignTo2048<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<256> for T

Source§

type Aligner = AlignTo256<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<32> for T

Source§

type Aligner = AlignTo32<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<32768> for T

Source§

type Aligner = AlignTo32768<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<4> for T

Source§

type Aligner = AlignTo4<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<4096> for T

Source§

type Aligner = AlignTo4096<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<512> for T

Source§

type Aligner = AlignTo512<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<64> for T

Source§

type Aligner = AlignTo64<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<8> for T

Source§

type Aligner = AlignTo8<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<8192> for T

Source§

type Aligner = AlignTo8192<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> DynEq for T
where T: Eq + Any,

Source§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

Source§

impl<T> DynHash for T
where T: Hash + Any,

Source§

fn dyn_hash(&self, state: &mut dyn Hasher)

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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
Source§

impl<'a, T> RCowCompatibleRef<'a> for T
where T: Clone + 'a,

Source§

type RefC = &'a T

The (preferably) ffi-safe equivalent of &Self.
Source§

type ROwned = T

The owned version of Self::RefC.
Source§

fn as_c_ref(from: &'a T) -> <T as RCowCompatibleRef<'a>>::RefC

Converts a reference to an FFI-safe type
Source§

fn as_rust_ref(from: <T as RCowCompatibleRef<'a>>::RefC) -> &'a T

Converts an FFI-safe type to a reference
Source§

impl<S> ROExtAcc for S

Source§

fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F

Gets a reference to a field, determined by offset. Read more
Source§

fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F

Gets a muatble reference to a field, determined by offset. Read more
Source§

fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F

Gets a const pointer to a field, the field is determined by offset. Read more
Source§

fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F

Gets a mutable pointer to a field, determined by offset. Read more
Source§

impl<S> ROExtOps<Aligned> for S

Source§

fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more
Source§

fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Aligned>, right: &mut S)

Swaps a field (determined by offset) with the same field in right. Read more
Source§

fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> F
where F: Copy,

Gets a copy of a field (determined by offset). The field is determined by offset. Read more
Source§

impl<S> ROExtOps<Unaligned> for S

Source§

fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more
Source§

fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, right: &mut S)

Swaps a field (determined by offset) with the same field in right. Read more
Source§

fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> F
where F: Copy,

Gets a copy of a field (determined by offset). The field is determined by offset. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

fn eq_id(&self, other: &Self) -> bool

Compares the address of self with the address of other. Read more
Source§

fn piped<F, U>(self, f: F) -> U
where F: FnOnce(Self) -> U, Self: Sized,

Emulates the pipeline operator, allowing method syntax in more places. Read more
Source§

fn piped_ref<'a, F, U>(&'a self, f: F) -> U
where F: FnOnce(&'a Self) -> U,

The same as piped except that the function takes &Self Useful for functions that take &Self instead of Self. Read more
Source§

fn piped_mut<'a, F, U>(&'a mut self, f: F) -> U
where F: FnOnce(&'a mut Self) -> U,

The same as piped, except that the function takes &mut Self. Useful for functions that take &mut Self instead of Self.
Source§

fn mutated<F>(self, f: F) -> Self
where F: FnOnce(&mut Self), Self: Sized,

Mutates self using a closure taking self by mutable reference, passing it along the method chain. Read more
Source§

fn observe<F>(self, f: F) -> Self
where F: FnOnce(&Self), Self: Sized,

Observes the value of self, passing it along unmodified. Useful in long method chains. Read more
Source§

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

Performs a conversion with Into. using the turbofish .into_::<_>() syntax. Read more
Source§

fn as_ref_<T>(&self) -> &T
where Self: AsRef<T>, T: ?Sized,

Performs a reference to reference conversion with AsRef, using the turbofish .as_ref_::<_>() syntax. Read more
Source§

fn as_mut_<T>(&mut self) -> &mut T
where Self: AsMut<T>, T: ?Sized,

Performs a mutable reference to mutable reference conversion with AsMut, using the turbofish .as_mut_::<_>() syntax. Read more
Source§

fn drop_(self)
where Self: Sized,

Drops self using method notation. Alternative to std::mem::drop. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<This> TransmuteElement for This
where This: ?Sized,

Source§

unsafe fn transmute_element<T>(self) -> Self::TransmutedPtr
where Self: CanTransmuteElement<T>,

Transmutes the element type of this pointer.. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

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

Source§

type Type = T

This is always Self.
Source§

fn into_type(self) -> Self::Type
where Self: Sized, Self::Type: Sized,

Converts a value back to the original type.
Source§

fn as_type(&self) -> &Self::Type

Converts a reference back to the original type.
Source§

fn as_type_mut(&mut self) -> &mut Self::Type

Converts a mutable reference back to the original type.
Source§

fn into_type_box(self: Box<Self>) -> Box<Self::Type>

Converts a box back to the original type.
Source§

fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>

Converts an Arc back to the original type. Read more
Source§

fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>

Converts an Rc back to the original type. Read more
Source§

fn from_type(this: Self::Type) -> Self
where Self: Sized, Self::Type: Sized,

Converts a value back to the original type.
Source§

fn from_type_ref(this: &Self::Type) -> &Self

Converts a reference back to the original type.
Source§

fn from_type_mut(this: &mut Self::Type) -> &mut Self

Converts a mutable reference back to the original type.
Source§

fn from_type_box(this: Box<Self::Type>) -> Box<Self>

Converts a box back to the original type.
Source§

fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>

Converts an Arc back to the original type.
Source§

fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>

Converts an Rc back to the original type.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Ungil for T
where T: Send,

Source§

impl<This> ValidTag_Bounds for This
where This: Debug + Clone + PartialEq,