use crate::lexer::spanned_token::Span;
#[derive(Debug, Clone, PartialEq)]
pub enum Modifier {
Temporary,
Temp,
Unlogged,
Global,
Local,
Materialized,
Replace,
}
#[derive(Debug, Clone, PartialEq)]
pub enum TokenKind {
Select,
From,
Where,
Insert,
Into,
Values,
Update,
Set,
Delete,
Returning,
Merge,
Create,
Database,
Connection,
Encoding,
Locale,
Table,
Tables,
Schema,
Authorization,
Drop,
Use,
Truncate,
Alter,
Reset,
Restart,
Identity,
Continue,
Index,
View,
Add,
Attach,
Column,
Rename,
To,
Owner,
Type,
Statistics,
Storage,
Options,
Data,
Role,
User,
Login,
NoLogin,
Password,
Superuser,
NoSuperuser,
Replication,
NoReplication,
Valid,
Until,
CreateDb,
NoCreateDb,
CreateRole,
NoCreateRole,
NoInherit,
Extension,
Version,
Constraint,
Primary,
Key,
Foreign,
References,
Unique,
Check,
Not,
Null,
Default,
Cascade,
Restrict,
Action,
And,
Or,
In,
Out,
Like,
Ilike,
Similar,
Between,
Is,
Exists,
Any,
Some,
Escape,
True,
False,
Group,
Order,
By,
Having,
Limit,
Offset,
Asc,
Desc,
Distinct,
All,
Nulls,
First,
Last,
Fetch,
Next,
PercentKw,
Tie,
Ties,
Union,
Intersect,
Except,
Begin,
Commit,
Rollback,
Transaction,
Savepoint,
Release,
With,
Recursive,
Case,
When,
Then,
Else,
End,
Cast,
If,
Join,
On,
As,
Inner,
Left,
Right,
Full,
Cross,
Outer,
Natural,
Using,
Lateral,
Inherits,
Inherit,
Partition,
Range,
List,
Hash,
Tablespace,
Location,
Collate,
Generated,
Always,
Stored,
AutoIncrement,
Detach,
Minvalue,
Maxvalue,
Preserve,
Rows,
Explain,
Analyze,
Describe,
Show,
Copy,
Vacuum,
For,
Share,
UpdateKw,
No,
Wait,
Skip,
Locked,
Only,
Over,
Filter,
Window,
RangeKw,
Preceding,
Following,
Current,
Row,
Unbounded,
Conflict,
Do,
Nothing,
Excluded,
Sequence,
Start,
Increment,
Cache,
Cycle,
Owned,
Varying,
Precision,
Zone,
Time,
Enum,
Domain,
Base,
Subtype,
Canonical,
Preferred,
Trigger,
Before,
After,
Instead,
Of,
InsteadOf, Each,
Execute,
Procedure,
Timeout,
Idempotent,
Retries,
Control,
Deferrable,
Initially,
Deferred,
Immediate,
Referencing,
Old,
New,
Statement,
Function,
Returns,
Language,
Volatile,
Stable,
Immutable,
Strict,
Parallel,
Safe,
Unsafe,
Restricted,
Variadic,
Inout,
Setof,
Raises,
Access,
Definer,
Invoker,
Cost,
Called,
Input,
Security,
Public,
Private,
Void,
Int,
Integer,
Int2,
Int4,
Int8,
Bigint,
Smallint,
Boolean,
Bool,
Text,
Varchar,
Char,
Character,
Real,
Double,
Float,
Float4,
Float8,
Numeric,
Decimal,
Binary,
VarBinary,
Date,
Timestamp,
Timestamptz,
Interval,
Json,
Jsonb,
Uuid,
Bytea,
Priority, Tags, Enabled, Disabled, Modifier(Modifier),
Ident,
QuotedIdent,
IntLit(i64),
FloatLit(f64),
StringLit,
BitStringLit,
HexStringLit,
ByteaLit,
DollarStringLit,
Parameter(u32),
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
Plus,
Minus,
Star,
Slash,
Percent,
Concat,
Arrow,
DoubleArrow,
DoubleColon,
MinusGt,
Pipe,
Caret,
Ampersand,
Tilde,
ShiftLeft,
ShiftRight,
RegexMatch,
RegexIMatch,
RegexNotMatch,
RegexNotIMatch,
At,
AtGt,
LtAt,
AtAt,
HashToken,
HashArrow,
HashDoubleArrow,
HashMinus,
Question,
QuestionPipe,
QuestionAmp,
LParen,
RParen,
LBracket,
RBracket,
LBrace,
RBrace,
Comma,
Semicolon,
Dot,
Eof,
Illegal(u8),
UnexpectedChar(u8),
UnterminatedString,
UnterminatedComment,
}
#[derive(Debug, Clone, PartialEq)]
pub struct Token {
pub kind: TokenKind,
pub span: Span,
}