Enum sql_ast::tokenizer::Token[][src]

pub enum Token {
Show variants 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, LParen, RParen, Period, Colon, DoubleColon, SemiColon, Backslash, LBracket, RBracket, Ampersand, LBrace, RBrace,
}
Expand description

SQL Token enumeration

Variants

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 %

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 &

LBrace

Left brace {

RBrace

Right brace }

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.