Enum models_parser::tokenizer::Token[][src]

pub enum Token {
Show 50 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, Mult, 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,
}
Expand description

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

Tuple Fields of Word

0: Word
Number(Stringbool)

An unsigned numeric literal

Tuple Fields of Number

0: String1: bool
Char(char)

A character that could not be tokenized

Tuple Fields of Char

0: char
SingleQuotedString(String)

Single quoted string: i.e: ‘string’

Tuple Fields of SingleQuotedString

0: String
NationalStringLiteral(String)

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

Tuple Fields of NationalStringLiteral

0: String
HexStringLiteral(String)

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

Tuple Fields of HexStringLiteral

0: String
Comma

Comma

Whitespace(Whitespace)

Whitespace (space, tab, etc)

Tuple Fields of Whitespace

0: Whitespace
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 -

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 }

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

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)

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.