[][src]Enum sqlparser::tokenizer::Token

pub enum Token {
    EOF,
    Word(Word),
    Number(String),
    Char(char),
    SingleQuotedString(String),
    NationalStringLiteral(String),
    HexStringLiteral(String),
    Comma,
    Whitespace(Whitespace),
    Eq,
    Neq,
    Lt,
    Gt,
    LtEq,
    GtEq,
    Plus,
    Minus,
    Mult,
    Div,
    Mod,
    StringConcat,
    LParen,
    RParen,
    Period,
    Colon,
    DoubleColon,
    SemiColon,
    Backslash,
    LBracket,
    RBracket,
    Ampersand,
    Pipe,
    Caret,
    LBrace,
    RBrace,
}

SQL Token enumeration

Variants

EOF

An end-of-file marker, not a real token

Word(Word)

A keyword (like SELECT) or an optionally quoted SQL identifier

Number(String)

An unsigned numeric literal

Char(char)

A character that could not be tokenized

SingleQuotedString(String)

Single quoted string: i.e: 'string'

NationalStringLiteral(String)

"National" string literal: i.e: N'string'

HexStringLiteral(String)

Hexadecimal string literal: i.e.: X'deadbeef'

Comma

Comma

Whitespace(Whitespace)

Whitespace (space, tab, etc)

Eq

Equality operator =

Neq

Not Equals operator <> (or != in some dialects)

Lt

Less Than operator <

Gt

Greater han operator >

LtEq

Less Than Or Equals operator <=

GtEq

Greater Than Or Equals operator >=

Plus

Plus operator +

Minus

Minus operator -

Mult

Multiplication operator *

Div

Division operator /

Mod

Modulo Operator %

StringConcat

String concatenation ||

LParen

Left parenthesis (

RParen

Right parenthesis )

Period

Period (used for compound identifiers or projections into nested types)

Colon

Colon :

DoubleColon

DoubleColon :: (used for casting in postgresql)

SemiColon

SemiColon ; used as separator for COPY and payload

Backslash

Backslash \ used in terminating the COPY payload with \.

LBracket

Left bracket [

RBracket

Right bracket ]

Ampersand

Ampersand &

Pipe

Pipe |

Caret

Caret ^

LBrace

Left brace {

RBrace

Right brace }

Implementations

impl Token[src]

pub fn make_keyword(keyword: &str) -> Self[src]

pub fn make_word(word: &str, quote_style: Option<char>) -> Self[src]

Trait Implementations

impl Clone for Token[src]

impl Debug for Token[src]

impl Display for Token[src]

impl PartialEq<Token> for Token[src]

impl StructuralPartialEq for Token[src]

Auto Trait Implementations

impl RefUnwindSafe for Token

impl Send for Token

impl Sync for Token

impl Unpin for Token

impl UnwindSafe for Token

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.