Enum wing_sqlparser::tokenizer::Token[][src]

pub enum Token {
Show 51 variants EOF, Word(Word), Number(Stringbool), Char(char), SingleQuotedString(String), NationalStringLiteral(String), HexStringLiteral(String), Comma, Whitespace(Whitespace), DoubleEq, Eq, Neq, Lt, Gt, LtEq, GtEq, Spaceship, Plus, Minus, Mul, Div, Mod, StringConcat, LParen, RParen, Period, Colon, DoubleColon, SemiColon, Backslash, LBracket, RBracket, Ampersand, Pipe, Caret, LBrace, RBrace, RArrow, Sharp, Tilde, TildeAsterisk, ExclamationMarkTilde, ExclamationMarkTildeAsterisk, ShiftLeft, ShiftRight, ExclamationMark, DoubleExclamationMark, AtSign, PGSquareRoot, PGCubeRoot, Placeholder(String),
}
Expand description

SQL Token enumeration

Variants

EOF

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

Word(Word)

Tuple Fields

0: Word

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

Number(Stringbool)

Tuple Fields

0: String
1: bool

An unsigned numeric literal

Char(char)

Tuple Fields

0: char

A character that could not be tokenized

SingleQuotedString(String)

Tuple Fields

0: String

Single quoted string: i.e: ‘string’

NationalStringLiteral(String)

Tuple Fields

0: String

“National” string literal: i.e: N’string’

HexStringLiteral(String)

Tuple Fields

0: String

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

Comma

Comma

Whitespace(Whitespace)

Tuple Fields

Whitespace (space, tab, etc)

DoubleEq

Double equals sign ==

Eq

Equality operator =

Neq

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

Lt

Less Than operator <

Gt

Greater Than operator >

LtEq

Less Than Or Equals operator <=

GtEq

Greater Than Or Equals operator >=

Spaceship

Spaceship operator <=>

Plus

Plus operator +

Minus

Minus operator -

Mul

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 }

RArrow

Right Arrow =>

Sharp

Sharp # used for PostgreSQL Bitwise XOR operator

Tilde

Tilde ~ used for PostgreSQL Bitwise NOT operator or case sensitive match regular expression operator

TildeAsterisk

~* , a case insensitive match regular expression operator in PostgreSQL

ExclamationMarkTilde

!~ , a case sensitive not match regular expression operator in PostgreSQL

ExclamationMarkTildeAsterisk

!~* , a case insensitive not match regular expression operator in PostgreSQL

ShiftLeft

<<, a bitwise shift left operator in PostgreSQL

ShiftRight

>>, a bitwise shift right operator in PostgreSQL

ExclamationMark

Exclamation Mark ! used for PostgreSQL factorial operator

DoubleExclamationMark

Double Exclamation Mark !! used for PostgreSQL prefix factorial operator

AtSign

AtSign @ used for PostgreSQL abs operator

PGSquareRoot

|/, a square root math operator in PostgreSQL

PGCubeRoot

||/ , a cube root math operator in PostgreSQL

Placeholder(String)

Tuple Fields

0: String

? or $ , a prepared statement arg placeholder

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

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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)

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.