pub enum Token {
Show 31 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 }