Enum sqlparser::ast::Statement [−][src]
A top-level statement (SELECT, INSERT, CREATE, etc.)
Variants
Analyze (Hive)
Fields of Analyze
Truncate (Hive)
Fields of Truncate
table_name: ObjectName
partitions: Option<Vec<Expr>>
Msck (Hive)
Fields of Msck
SELECT
INSERT
Fields of Insert
or: Option<SqliteOnConflict>
Only for Sqlite
table_name: ObjectName
TABLE
columns: Vec<Ident>
COLUMNS
overwrite: bool
Overwrite (Hive)
source: Box<Query>
A SQL query that specifies what to insert
partitioned: Option<Vec<Expr>>
partitioned insert (Hive)
after_columns: Vec<Ident>
Columns defined after PARTITION
table: bool
whether the insert has the table keyword (Hive)
Fields of Directory
Fields of Copy
UPDATE
Fields of Update
table_name: ObjectName
TABLE
assignments: Vec<Assignment>
Column assignments
selection: Option<Expr>
WHERE
DELETE
Fields of Delete
CREATE VIEW
Fields of CreateView
CREATE TABLE
Fields of CreateTable
or_replace: bool
temporary: bool
external: bool
if_not_exists: bool
name: ObjectName
Table name
columns: Vec<ColumnDef>
Optional schema
constraints: Vec<TableConstraint>
hive_distribution: HiveDistributionStyle
hive_formats: Option<HiveFormat>
table_properties: Vec<SqlOption>
with_options: Vec<SqlOption>
file_format: Option<FileFormat>
location: Option<String>
query: Option<Box<Query>>
without_rowid: bool
like: Option<ObjectName>
SQLite's CREATE VIRTUAL TABLE .. USING <module_name> (<module_args>)
Fields of CreateVirtualTable
CREATE INDEX
Fields of CreateIndex
name: ObjectName
index name
table_name: ObjectName
columns: Vec<OrderByExpr>
unique: bool
if_not_exists: bool
ALTER TABLE
Fields of AlterTable
DROP
Fields of Drop
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.
purge: bool
Hive allows you specify whether the table's stored data will be deleted along with the dropped table
SET
Note: this is not a standard SQL statement, but it is supported by at least MySQL and PostgreSQL. Not all MySQL-specific syntatic forms are supported yet.
Fields of SetVariable
SHOW
Note: this is a PostgreSQL-specific statement.
SHOW COLUMNS
Note: this is a MySQL-specific statement.
Fields of ShowColumns
{ BEGIN [ TRANSACTION | WORK ] | START TRANSACTION } ...
Fields of StartTransaction
modes: Vec<TransactionMode>
SET TRANSACTION ...
Fields of SetTransaction
modes: Vec<TransactionMode>
COMMIT [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]
Fields of Commit
chain: bool
ROLLBACK [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]
Fields of Rollback
chain: bool
CREATE SCHEMA
Fields of CreateSchema
schema_name: ObjectName
if_not_exists: bool
CREATE DATABASE
Fields of CreateDatabase
ASSERT <condition> [AS <message>]
DEALLOCATE [ PREPARE ] { name | ALL }
Note: this is a PostgreSQL-specific statement.
EXECUTE name [ ( parameter [, ...] ) ]
Note: this is a PostgreSQL-specific statement.
PREPARE name [ ( data_type [, ...] ) ] AS statement
Note: this is a PostgreSQL-specific statement.
EXPLAIN
Fields of Explain
Trait Implementations
impl Clone for Statement
[src]
impl Debug for Statement
[src]
impl Display for Statement
[src]
impl Eq for Statement
[src]
impl Hash for Statement
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Statement> for Statement
[src]
impl StructuralEq for Statement
[src]
impl StructuralPartialEq for Statement
[src]
Auto Trait Implementations
impl RefUnwindSafe for Statement
[src]
impl Send for Statement
[src]
impl Sync for Statement
[src]
impl Unpin for Statement
[src]
impl UnwindSafe for Statement
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,