Skip to main content

SqlTokenType

Enum SqlTokenType 

Source
pub enum SqlTokenType {
Show 171 variants Root, ExplainStatement, TransactionStatement, PragmaStatement, ShowStatement, SelectStatement, InsertStatement, UpdateStatement, DeleteStatement, CreateStatement, DropStatement, AlterStatement, Expression, Identifier, TableName, ColumnName, JoinClause, GroupByClause, HavingClause, OrderByClause, LimitClause, SelectItem, Alias, ColumnDefinition, ValueList, Assignment, AlterAction, ErrorNode, Whitespace, Newline, Comment, LineComment, BlockComment, NumberLiteral, FloatLiteral, StringLiteral, BooleanLiteral, NullLiteral, Identifier_, Select, From, Where, Insert, Into, Values, Update, Set, Delete, Create, Table, Drop, Alter, Add, Column, Primary, Key, Foreign, References, Index, Unique, Not, Null, Default, AutoIncrement, And, Or, In, Like, Between, Is, As, Join, Inner, Left, Right, Full, Outer, On, Group, By, Having, Order, Asc, Desc, Limit, Offset, Union, All, Distinct, Count, Sum, Avg, Min, Max, Explain, Pragma, Show, View, Database, Schema, True, False, Exists, Trigger, After, Delimiter, For, Each, Row, Check, Rename, To, Case, When, Then, Else, End, If, Begin, Commit, Rollback, Transaction, Conflict, Do, Nothing, Returning, Vector, Ilike, Strict, Without, Rowid, Int, Integer, Varchar, Char, Text, Date, Time, Timestamp, Decimal, Float, Double, Boolean, Serial, BigSerial, Plus, Minus, Star, Slash, Percent, Equal, NotEqual, Less, Greater, LessEqual, GreaterEqual, Concat, DoubleColon, LeftParen, RightParen, LeftBracket, RightBracket, LeftBrace, RightBrace, Comma, Semicolon, Dot, Colon, Question, Error, Eof,
}
Expand description

Token types for the SQL language.

Variants§

§

Root

Root node.

§

ExplainStatement

EXPLAIN statement.

§

TransactionStatement

TRANSACTION statement.

§

PragmaStatement

PRAGMA statement.

§

ShowStatement

SHOW statement.

§

SelectStatement

SELECT statement.

§

InsertStatement

INSERT statement.

§

UpdateStatement

UPDATE statement.

§

DeleteStatement

DELETE statement.

§

CreateStatement

CREATE statement.

§

DropStatement

DROP statement.

§

AlterStatement

ALTER statement.

§

Expression

SQL expression.

§

Identifier

Identifier.

§

TableName

Table name.

§

ColumnName

Column name.

§

JoinClause

JOIN clause.

§

GroupByClause

GROUP BY clause.

§

HavingClause

HAVING clause.

§

OrderByClause

ORDER BY clause.

§

LimitClause

LIMIT clause.

§

SelectItem

Select item.

§

Alias

Alias.

§

ColumnDefinition

Column definition.

§

ValueList

Value list.

§

Assignment

Assignment.

§

AlterAction

Alter action.

§

ErrorNode

Error node.

§

Whitespace

Whitespace.

§

Newline

Newline.

§

Comment

Comment.

§

LineComment

Line comment.

§

BlockComment

Block comment.

§

NumberLiteral

Number literal.

§

FloatLiteral

Float literal.

§

StringLiteral

String literal.

§

BooleanLiteral

Boolean literal.

§

NullLiteral

NULL literal.

§

Identifier_

Identifier token.

§

Select

SELECT keyword.

§

From

FROM keyword.

§

Where

WHERE keyword.

§

Insert

INSERT keyword.

§

Into

INTO keyword.

§

Values

VALUES keyword.

§

Update

UPDATE keyword.

§

Set

SET keyword.

§

Delete

DELETE keyword.

§

Create

CREATE keyword.

§

Table

TABLE keyword.

§

Drop

DROP keyword.

§

Alter

ALTER keyword.

§

Add

ADD keyword.

§

Column

COLUMN keyword.

§

Primary

PRIMARY keyword.

§

Key

KEY keyword.

§

Foreign

FOREIGN keyword.

§

References

REFERENCES keyword.

§

Index

INDEX keyword.

§

Unique

UNIQUE keyword.

§

Not

NOT keyword.

§

Null

NULL keyword.

§

Default

DEFAULT keyword.

§

AutoIncrement

AUTO_INCREMENT keyword.

§

And

AND keyword.

§

Or

OR keyword.

§

In

IN keyword.

§

Like

LIKE keyword.

§

Between

BETWEEN keyword.

§

Is

IS keyword.

§

As

AS keyword.

§

Join

JOIN keyword.

§

Inner

INNER keyword.

§

Left

LEFT keyword.

§

Right

RIGHT keyword.

§

Full

FULL keyword.

§

Outer

OUTER keyword.

§

On

ON keyword.

§

Group

GROUP keyword.

§

By

BY keyword.

§

Having

HAVING keyword.

§

Order

ORDER keyword.

§

Asc

ASC keyword.

§

Desc

DESC keyword.

§

Limit

LIMIT keyword.

§

Offset

OFFSET keyword.

§

Union

UNION keyword.

§

All

ALL keyword.

§

Distinct

DISTINCT keyword.

§

Count

COUNT keyword.

§

Sum

SUM keyword.

§

Avg

AVG keyword.

§

Min

MIN keyword.

§

Max

MAX keyword.

§

Explain

EXPLAIN keyword.

§

Pragma

PRAGMA keyword.

§

Show

SHOW keyword.

§

View

VIEW keyword.

§

Database

DATABASE keyword.

§

Schema

SCHEMA keyword.

§

True

TRUE keyword.

§

False

FALSE keyword.

§

Exists

EXISTS keyword.

§

Trigger

TRIGGER keyword.

§

After

AFTER keyword.

§

Delimiter

DELIMITER keyword.

§

For

FOR keyword.

§

Each

EACH keyword.

§

Row

ROW keyword.

§

Check

CHECK keyword.

§

Rename

RENAME keyword.

§

To

TO keyword.

§

Case

CASE keyword.

§

When

WHEN keyword.

§

Then

THEN keyword.

§

Else

ELSE keyword.

§

End

END keyword.

§

If

IF keyword.

§

Begin

BEGIN keyword.

§

Commit

COMMIT keyword.

§

Rollback

ROLLBACK keyword.

§

Transaction

TRANSACTION keyword.

§

Conflict

CONFLICT keyword.

§

Do

DO keyword.

§

Nothing

NOTHING keyword.

§

Returning

RETURNING keyword.

§

Vector

VECTOR keyword.

§

Ilike

ILIKE keyword.

§

Strict

STRICT keyword.

§

Without

WITHOUT keyword.

§

Rowid

ROWID keyword.

§

Int

INT type.

§

Integer

INTEGER type.

§

Varchar

VARCHAR type.

§

Char

CHAR type.

§

Text

TEXT type.

§

Date

DATE type.

§

Time

TIME type.

§

Timestamp

TIMESTAMP type.

§

Decimal

DECIMAL type.

§

Float

FLOAT type.

§

Double

DOUBLE type.

§

Boolean

BOOLEAN type.

§

Serial

SERIAL type.

§

BigSerial

BIGSERIAL type.

§

Plus

Plus operator +.

§

Minus

Minus operator -.

§

Star

Multiplication operator *.

§

Slash

Division operator /.

§

Percent

Modulo operator %.

§

Equal

Equality operator =.

§

NotEqual

Inequality operator <>.

§

Less

Less than operator <.

§

Greater

Greater than operator >.

§

LessEqual

Less than or equal operator <=.

§

GreaterEqual

Greater than or equal operator >=.

§

Concat

Concatenation operator ||.

§

DoubleColon

Double Colon ::.

§

LeftParen

Left parenthesis (.

§

RightParen

Right parenthesis ).

§

LeftBracket

Left bracket [.

§

RightBracket

Right bracket ].

§

LeftBrace

Left brace {.

§

RightBrace

Right brace }.

§

Comma

Comma ,.

§

Semicolon

Semicolon ;.

§

Dot

Dot ..

§

Colon

Colon :.

§

Question

Question mark ?.

§

Error

Error token.

§

Eof

End of stream.

Trait Implementations§

Source§

impl Clone for SqlTokenType

Source§

fn clone(&self) -> SqlTokenType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SqlTokenType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SqlTokenType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<SqlElementType> for SqlTokenType

Source§

fn from(element: SqlElementType) -> Self

Converts to this type from the input type.
Source§

impl From<SqlTokenType> for SqlElementType

Source§

fn from(token: SqlTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for SqlTokenType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SqlTokenType

Source§

fn eq(&self, other: &SqlTokenType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SqlTokenType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TokenType for SqlTokenType

Source§

const END_OF_STREAM: Self = Self::Eof

A constant representing the end of the input stream.
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

fn is_ignored(&self) -> bool

Returns true if this token represents trivia (whitespace, comments, etc.).
Source§

fn is_comment(&self) -> bool

Returns true if this token represents a comment.
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace.
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this token.
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this token matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalTokenRole) -> bool

Returns true if this token matches the specified universal role.
Source§

fn is_error(&self) -> bool

Returns true if this token represents an error condition.
Source§

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream.
Source§

impl Copy for SqlTokenType

Source§

impl Eq for SqlTokenType

Source§

impl StructuralPartialEq for SqlTokenType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,