[][src]Enum sqlparser::sqlast::SQLStatement

pub enum SQLStatement {
    SQLSelect(SQLQuery),
    SQLInsert {
        table_name: SQLObjectName,
        columns: Vec<SQLIdent>,
        values: Vec<Vec<ASTNode>>,
    },
    SQLCopy {
        table_name: SQLObjectName,
        columns: Vec<SQLIdent>,
        values: Vec<Option<String>>,
    },
    SQLUpdate {
        table_name: SQLObjectName,
        assignments: Vec<SQLAssignment>,
        selection: Option<ASTNode>,
    },
    SQLDelete {
        table_name: SQLObjectName,
        selection: Option<ASTNode>,
    },
    SQLCreateView {
        name: SQLObjectName,
        query: SQLQuery,
        materialized: bool,
    },
    SQLCreateTable {
        name: SQLObjectName,
        columns: Vec<SQLColumnDef>,
    },
    SQLAlterTable {
        name: SQLObjectName,
        operation: AlterOperation,
    },
}

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

Variants

SQLSelect(SQLQuery)

SELECT

SQLInsert

INSERT

Fields of SQLInsert

table_name: SQLObjectName

TABLE

columns: Vec<SQLIdent>

COLUMNS

values: Vec<Vec<ASTNode>>

VALUES (vector of rows to insert)

SQLCopy

Fields of SQLCopy

table_name: SQLObjectName

TABLE

columns: Vec<SQLIdent>

COLUMNS

values: Vec<Option<String>>

VALUES a vector of values to be copied

SQLUpdate

UPDATE

Fields of SQLUpdate

table_name: SQLObjectName

TABLE

assignments: Vec<SQLAssignment>

Column assignments

selection: Option<ASTNode>

WHERE

SQLDelete

DELETE

Fields of SQLDelete

table_name: SQLObjectName

FROM

selection: Option<ASTNode>

WHERE

SQLCreateView

CREATE VIEW

Fields of SQLCreateView

name: SQLObjectName

View name

query: SQLQuerymaterialized: bool
SQLCreateTable

CREATE TABLE

Fields of SQLCreateTable

name: SQLObjectName

Table name

columns: Vec<SQLColumnDef>

Optional schema

SQLAlterTable

ALTER TABLE

Fields of SQLAlterTable

name: SQLObjectName

Table name

operation: AlterOperation

Trait Implementations

impl ToString for SQLStatement[src]

impl PartialEq<SQLStatement> for SQLStatement[src]

impl Clone for SQLStatement[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for SQLStatement[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.