#[repr(u16)]pub enum TokenType {
Show 533 variants
LParen = 0,
RParen = 1,
LBracket = 2,
RBracket = 3,
LBrace = 4,
RBrace = 5,
Comma = 6,
Dot = 7,
Dash = 8,
Plus = 9,
Colon = 10,
DotColon = 11,
DColon = 12,
DColonDollar = 13,
DColonPercent = 14,
DColonQMark = 15,
DQMark = 16,
Semicolon = 17,
Star = 18,
Backslash = 19,
Slash = 20,
Lt = 21,
Lte = 22,
Gt = 23,
Gte = 24,
Not = 25,
Eq = 26,
Neq = 27,
NullsafeEq = 28,
ColonEq = 29,
ColonGt = 30,
NColonGt = 31,
And = 32,
Or = 33,
Amp = 34,
DPipe = 35,
PipeGt = 36,
Pipe = 37,
PipeSlash = 38,
DPipeSlash = 39,
Caret = 40,
CaretAt = 41,
LtLt = 42,
GtGt = 43,
Tilde = 44,
Arrow = 45,
DArrow = 46,
FArrow = 47,
Hash = 48,
HashArrow = 49,
DHashArrow = 50,
LrArrow = 51,
DAt = 52,
AtAt = 53,
LtAt = 54,
AtGt = 55,
Dollar = 56,
Parameter = 57,
Session = 58,
SessionParameter = 59,
SessionUser = 60,
DAmp = 61,
AmpLt = 62,
AmpGt = 63,
Adjacent = 64,
Xor = 65,
DStar = 66,
QMarkAmp = 67,
QMarkPipe = 68,
HashDash = 69,
Exclamation = 70,
UriStart = 71,
BlockStart = 72,
BlockEnd = 73,
Space = 74,
Break = 75,
BlockComment = 76,
LineComment = 77,
String = 78,
DollarString = 79,
TripleDoubleQuotedString = 80,
TripleSingleQuotedString = 81,
Number = 82,
Identifier = 83,
QuotedIdentifier = 84,
Database = 85,
Column = 86,
ColumnDef = 87,
Schema = 88,
Table = 89,
Warehouse = 90,
Stage = 91,
Streamlit = 92,
Var = 93,
BitString = 94,
HexString = 95,
HexNumber = 96,
ByteString = 97,
NationalString = 98,
EscapeString = 99,
RawString = 100,
HeredocString = 101,
HeredocStringAlternative = 102,
UnicodeString = 103,
Bit = 104,
Boolean = 105,
TinyInt = 106,
UTinyInt = 107,
SmallInt = 108,
USmallInt = 109,
MediumInt = 110,
UMediumInt = 111,
Int = 112,
UInt = 113,
BigInt = 114,
UBigInt = 115,
BigNum = 116,
Int128 = 117,
UInt128 = 118,
Int256 = 119,
UInt256 = 120,
Float = 121,
Double = 122,
UDouble = 123,
Decimal = 124,
Decimal32 = 125,
Decimal64 = 126,
Decimal128 = 127,
Decimal256 = 128,
DecFloat = 129,
UDecimal = 130,
BigDecimal = 131,
Char = 132,
NChar = 133,
VarChar = 134,
NVarChar = 135,
BpChar = 136,
Text = 137,
MediumText = 138,
LongText = 139,
Blob = 140,
MediumBlob = 141,
LongBlob = 142,
TinyBlob = 143,
TinyText = 144,
Name = 145,
Binary = 146,
VarBinary = 147,
Json = 148,
JsonB = 149,
Time = 150,
TimeTz = 151,
TimeNs = 152,
Timestamp = 153,
TimestampTz = 154,
TimestampLtz = 155,
TimestampNtz = 156,
TimestampS = 157,
TimestampMs = 158,
TimestampNs = 159,
DateTime = 160,
DateTime2 = 161,
DateTime64 = 162,
SmallDateTime = 163,
Date = 164,
Date32 = 165,
Int4Range = 166,
Int4MultiRange = 167,
Int8Range = 168,
Int8MultiRange = 169,
NumRange = 170,
NumMultiRange = 171,
TsRange = 172,
TsMultiRange = 173,
TsTzRange = 174,
TsTzMultiRange = 175,
DateRange = 176,
DateMultiRange = 177,
Uuid = 178,
Geography = 179,
GeographyPoint = 180,
Nullable = 181,
Geometry = 182,
Point = 183,
Ring = 184,
LineString = 185,
LocalTime = 186,
LocalTimestamp = 187,
SysTimestamp = 188,
MultiLineString = 189,
Polygon = 190,
MultiPolygon = 191,
HllSketch = 192,
HStore = 193,
Super = 194,
Serial = 195,
SmallSerial = 196,
BigSerial = 197,
Xml = 198,
Year = 199,
UserDefined = 200,
Money = 201,
SmallMoney = 202,
RowVersion = 203,
Image = 204,
Variant = 205,
Object = 206,
Inet = 207,
IpAddress = 208,
IpPrefix = 209,
Ipv4 = 210,
Ipv6 = 211,
Enum = 212,
Enum8 = 213,
Enum16 = 214,
FixedString = 215,
LowCardinality = 216,
Nested = 217,
AggregateFunction = 218,
SimpleAggregateFunction = 219,
TDigest = 220,
Unknown = 221,
Vector = 222,
Dynamic = 223,
Void = 224,
Add = 225,
Alias = 226,
Alter = 227,
All = 228,
Anti = 229,
Any = 230,
Apply = 231,
Array = 232,
Asc = 233,
AsOf = 234,
Attach = 235,
AutoIncrement = 236,
Begin = 237,
Between = 238,
BulkCollectInto = 239,
Cache = 240,
Cascade = 241,
Case = 242,
CharacterSet = 243,
Cluster = 244,
ClusterBy = 245,
Collate = 246,
Command = 247,
Comment = 248,
Commit = 249,
Prepare = 250,
Preserve = 251,
Connect = 252,
ConnectBy = 253,
Constraint = 254,
Copy = 255,
Create = 256,
Cross = 257,
Cube = 258,
CurrentDate = 259,
CurrentDateTime = 260,
CurrentSchema = 261,
CurrentTime = 262,
CurrentTimestamp = 263,
CurrentUser = 264,
CurrentRole = 265,
CurrentCatalog = 266,
Declare = 267,
Default = 268,
Delete = 269,
Desc = 270,
Describe = 271,
Detach = 272,
Dictionary = 273,
Distinct = 274,
Distribute = 275,
DistributeBy = 276,
Div = 277,
Drop = 278,
Else = 279,
End = 280,
Escape = 281,
Except = 282,
Execute = 283,
Exists = 284,
False = 285,
Fetch = 286,
File = 287,
FileFormat = 288,
Filter = 289,
Final = 290,
First = 291,
For = 292,
Force = 293,
ForeignKey = 294,
Format = 295,
From = 296,
Full = 297,
Function = 298,
Get = 299,
Glob = 300,
Global = 301,
Grant = 302,
GroupBy = 303,
GroupingSets = 304,
Having = 305,
Hint = 306,
Ignore = 307,
ILike = 308,
In = 309,
Index = 310,
IndexedBy = 311,
Inner = 312,
Input = 313,
Insert = 314,
Install = 315,
Intersect = 316,
Interval = 317,
Into = 318,
Inpath = 319,
InputFormat = 320,
Introducer = 321,
IRLike = 322,
Is = 323,
IsNull = 324,
Join = 325,
JoinMarker = 326,
Keep = 327,
Key = 328,
Kill = 329,
Lambda = 330,
Language = 331,
Lateral = 332,
Left = 333,
Like = 334,
NotLike = 335,
NotILike = 336,
NotRLike = 337,
NotIRLike = 338,
Limit = 339,
List = 340,
Load = 341,
Local = 342,
Lock = 343,
Map = 344,
Match = 345,
MatchCondition = 346,
MatchRecognize = 347,
MemberOf = 348,
Materialized = 349,
Merge = 350,
Mod = 351,
Model = 352,
Natural = 353,
Next = 354,
NoAction = 355,
Nothing = 356,
NotNull = 357,
Null = 358,
ObjectIdentifier = 359,
Offset = 360,
On = 361,
Only = 362,
Operator = 363,
OrderBy = 364,
OrderSiblingsBy = 365,
Ordered = 366,
Ordinality = 367,
Out = 368,
Outer = 369,
Output = 370,
Over = 371,
Overlaps = 372,
Overwrite = 373,
Partition = 374,
PartitionBy = 375,
Percent = 376,
Pivot = 377,
Placeholder = 378,
Positional = 379,
Pragma = 380,
Prewhere = 381,
PrimaryKey = 382,
Procedure = 383,
Properties = 384,
PseudoType = 385,
Put = 386,
Qualify = 387,
Quote = 388,
QDColon = 389,
Range = 390,
Recursive = 391,
Refresh = 392,
Rename = 393,
Replace = 394,
Returning = 395,
Revoke = 396,
References = 397,
Restrict = 398,
Right = 399,
RLike = 400,
Rollback = 401,
Rollup = 402,
Row = 403,
Rows = 404,
Select = 405,
Semi = 406,
Savepoint = 407,
Separator = 408,
Sequence = 409,
Serde = 410,
SerdeProperties = 411,
Set = 412,
Settings = 413,
Show = 414,
Siblings = 415,
SimilarTo = 416,
Some = 417,
Sort = 418,
SortBy = 419,
SoundsLike = 420,
StartWith = 421,
StorageIntegration = 422,
StraightJoin = 423,
Struct = 424,
Summarize = 425,
TableSample = 426,
Sample = 427,
Bernoulli = 428,
System = 429,
Block = 430,
Seed = 431,
Repeatable = 432,
Tag = 433,
Temporary = 434,
Transaction = 435,
To = 436,
Top = 437,
Then = 438,
True = 439,
Truncate = 440,
Uncache = 441,
Union = 442,
Unnest = 443,
Unpivot = 444,
Update = 445,
Use = 446,
Using = 447,
Values = 448,
View = 449,
SemanticView = 450,
Volatile = 451,
When = 452,
Where = 453,
Window = 454,
With = 455,
Ties = 456,
Exclude = 457,
No = 458,
Others = 459,
Unique = 460,
UtcDate = 461,
UtcTime = 462,
UtcTimestamp = 463,
VersionSnapshot = 464,
TimestampSnapshot = 465,
Option = 466,
Sink = 467,
Source = 468,
Analyze = 469,
Namespace = 470,
Export = 471,
As = 472,
By = 473,
Nulls = 474,
Respect = 475,
Last = 476,
If = 477,
Cast = 478,
TryCast = 479,
SafeCast = 480,
Count = 481,
Extract = 482,
Substring = 483,
Trim = 484,
Leading = 485,
Trailing = 486,
Both = 487,
Position = 488,
Overlaying = 489,
Placing = 490,
Treat = 491,
Within = 492,
Group = 493,
Order = 494,
Unbounded = 495,
Preceding = 496,
Following = 497,
Current = 498,
Groups = 499,
Trigger = 500,
Type = 501,
Domain = 502,
Returns = 503,
Body = 504,
Increment = 505,
Minvalue = 506,
Maxvalue = 507,
Start = 508,
Cycle = 509,
NoCycle = 510,
Prior = 511,
Generated = 512,
Identity = 513,
Always = 514,
Measures = 515,
Pattern = 516,
Define = 517,
Running = 518,
Owned = 519,
After = 520,
Before = 521,
Instead = 522,
Each = 523,
Statement = 524,
Referencing = 525,
Old = 526,
New = 527,
Of = 528,
Check = 529,
Authorization = 530,
Restart = 531,
Eof = 532,
}Expand description
All possible token types in SQL
Variants§
LParen = 0
RParen = 1
LBracket = 2
RBracket = 3
LBrace = 4
RBrace = 5
Comma = 6
Dot = 7
Dash = 8
Plus = 9
Colon = 10
DotColon = 11
DColon = 12
DColonDollar = 13
DColonPercent = 14
DColonQMark = 15
DQMark = 16
Semicolon = 17
Star = 18
Backslash = 19
Slash = 20
Lt = 21
Lte = 22
Gt = 23
Gte = 24
Not = 25
Eq = 26
Neq = 27
NullsafeEq = 28
ColonEq = 29
ColonGt = 30
NColonGt = 31
And = 32
Or = 33
Amp = 34
DPipe = 35
PipeGt = 36
Pipe = 37
PipeSlash = 38
DPipeSlash = 39
Caret = 40
CaretAt = 41
LtLt = 42
GtGt = 43
Tilde = 44
Arrow = 45
DArrow = 46
FArrow = 47
Hash = 48
HashArrow = 49
DHashArrow = 50
LrArrow = 51
DAt = 52
AtAt = 53
LtAt = 54
AtGt = 55
Dollar = 56
Parameter = 57
Session = 58
SessionParameter = 59
SessionUser = 60
DAmp = 61
AmpLt = 62
AmpGt = 63
Adjacent = 64
Xor = 65
DStar = 66
QMarkAmp = 67
QMarkPipe = 68
HashDash = 69
Exclamation = 70
UriStart = 71
BlockStart = 72
BlockEnd = 73
Space = 74
Break = 75
BlockComment = 76
LineComment = 77
String = 78
DollarString = 79
TripleDoubleQuotedString = 80
TripleSingleQuotedString = 81
Number = 82
Identifier = 83
QuotedIdentifier = 84
Database = 85
Column = 86
ColumnDef = 87
Schema = 88
Table = 89
Warehouse = 90
Stage = 91
Streamlit = 92
Var = 93
BitString = 94
HexString = 95
HexNumber = 96
Hex number: 0xA, 0xFF (BigQuery, SQLite style) - represents an integer in hex notation
ByteString = 97
NationalString = 98
EscapeString = 99
RawString = 100
HeredocString = 101
HeredocStringAlternative = 102
UnicodeString = 103
Bit = 104
Boolean = 105
TinyInt = 106
UTinyInt = 107
SmallInt = 108
USmallInt = 109
MediumInt = 110
UMediumInt = 111
Int = 112
UInt = 113
BigInt = 114
UBigInt = 115
BigNum = 116
Int128 = 117
UInt128 = 118
Int256 = 119
UInt256 = 120
Float = 121
Double = 122
UDouble = 123
Decimal = 124
Decimal32 = 125
Decimal64 = 126
Decimal128 = 127
Decimal256 = 128
DecFloat = 129
UDecimal = 130
BigDecimal = 131
Char = 132
NChar = 133
VarChar = 134
NVarChar = 135
BpChar = 136
Text = 137
MediumText = 138
LongText = 139
Blob = 140
MediumBlob = 141
LongBlob = 142
TinyBlob = 143
TinyText = 144
Name = 145
Binary = 146
VarBinary = 147
Json = 148
JsonB = 149
Time = 150
TimeTz = 151
TimeNs = 152
Timestamp = 153
TimestampTz = 154
TimestampLtz = 155
TimestampNtz = 156
TimestampS = 157
TimestampMs = 158
TimestampNs = 159
DateTime = 160
DateTime2 = 161
DateTime64 = 162
SmallDateTime = 163
Date = 164
Date32 = 165
Int4Range = 166
Int4MultiRange = 167
Int8Range = 168
Int8MultiRange = 169
NumRange = 170
NumMultiRange = 171
TsRange = 172
TsMultiRange = 173
TsTzRange = 174
TsTzMultiRange = 175
DateRange = 176
DateMultiRange = 177
Uuid = 178
Geography = 179
GeographyPoint = 180
Nullable = 181
Geometry = 182
Point = 183
Ring = 184
LineString = 185
LocalTime = 186
LocalTimestamp = 187
SysTimestamp = 188
MultiLineString = 189
Polygon = 190
MultiPolygon = 191
HllSketch = 192
HStore = 193
Super = 194
Serial = 195
SmallSerial = 196
BigSerial = 197
Xml = 198
Year = 199
UserDefined = 200
Money = 201
SmallMoney = 202
RowVersion = 203
Image = 204
Variant = 205
Object = 206
Inet = 207
IpAddress = 208
IpPrefix = 209
Ipv4 = 210
Ipv6 = 211
Enum = 212
Enum8 = 213
Enum16 = 214
FixedString = 215
LowCardinality = 216
Nested = 217
AggregateFunction = 218
SimpleAggregateFunction = 219
TDigest = 220
Unknown = 221
Vector = 222
Dynamic = 223
Void = 224
Add = 225
Alias = 226
Alter = 227
All = 228
Anti = 229
Any = 230
Apply = 231
Array = 232
Asc = 233
AsOf = 234
Attach = 235
AutoIncrement = 236
Begin = 237
Between = 238
BulkCollectInto = 239
Cache = 240
Cascade = 241
Case = 242
CharacterSet = 243
Cluster = 244
ClusterBy = 245
Collate = 246
Command = 247
Comment = 248
Commit = 249
Prepare = 250
Preserve = 251
Connect = 252
ConnectBy = 253
Constraint = 254
Copy = 255
Create = 256
Cross = 257
Cube = 258
CurrentDate = 259
CurrentDateTime = 260
CurrentSchema = 261
CurrentTime = 262
CurrentTimestamp = 263
CurrentUser = 264
CurrentRole = 265
CurrentCatalog = 266
Declare = 267
Default = 268
Delete = 269
Desc = 270
Describe = 271
Detach = 272
Dictionary = 273
Distinct = 274
Distribute = 275
DistributeBy = 276
Div = 277
Drop = 278
Else = 279
End = 280
Escape = 281
Except = 282
Execute = 283
Exists = 284
False = 285
Fetch = 286
File = 287
FileFormat = 288
Filter = 289
Final = 290
First = 291
For = 292
Force = 293
ForeignKey = 294
Format = 295
From = 296
Full = 297
Function = 298
Get = 299
Glob = 300
Global = 301
Grant = 302
GroupBy = 303
GroupingSets = 304
Having = 305
Hint = 306
Ignore = 307
ILike = 308
In = 309
Index = 310
IndexedBy = 311
Inner = 312
Input = 313
Insert = 314
Install = 315
Intersect = 316
Interval = 317
Into = 318
Inpath = 319
InputFormat = 320
Introducer = 321
IRLike = 322
Is = 323
IsNull = 324
Join = 325
JoinMarker = 326
Keep = 327
Key = 328
Kill = 329
Lambda = 330
Language = 331
Lateral = 332
Left = 333
Like = 334
NotLike = 335
NotILike = 336
NotRLike = 337
NotIRLike = 338
Limit = 339
List = 340
Load = 341
Local = 342
Lock = 343
Map = 344
Match = 345
MatchCondition = 346
MatchRecognize = 347
MemberOf = 348
Materialized = 349
Merge = 350
Mod = 351
Model = 352
Natural = 353
Next = 354
NoAction = 355
Nothing = 356
NotNull = 357
Null = 358
ObjectIdentifier = 359
Offset = 360
On = 361
Only = 362
Operator = 363
OrderBy = 364
OrderSiblingsBy = 365
Ordered = 366
Ordinality = 367
Out = 368
Outer = 369
Output = 370
Over = 371
Overlaps = 372
Overwrite = 373
Partition = 374
PartitionBy = 375
Percent = 376
Pivot = 377
Placeholder = 378
Positional = 379
Pragma = 380
Prewhere = 381
PrimaryKey = 382
Procedure = 383
Properties = 384
PseudoType = 385
Put = 386
Qualify = 387
Quote = 388
QDColon = 389
Range = 390
Recursive = 391
Refresh = 392
Rename = 393
Replace = 394
Returning = 395
Revoke = 396
References = 397
Restrict = 398
Right = 399
RLike = 400
Rollback = 401
Rollup = 402
Row = 403
Rows = 404
Select = 405
Semi = 406
Savepoint = 407
Separator = 408
Sequence = 409
Serde = 410
SerdeProperties = 411
Set = 412
Settings = 413
Show = 414
Siblings = 415
SimilarTo = 416
Some = 417
Sort = 418
SortBy = 419
SoundsLike = 420
StartWith = 421
StorageIntegration = 422
StraightJoin = 423
Struct = 424
Summarize = 425
TableSample = 426
Sample = 427
Bernoulli = 428
System = 429
Block = 430
Seed = 431
Repeatable = 432
Tag = 433
Temporary = 434
Transaction = 435
To = 436
Top = 437
Then = 438
True = 439
Truncate = 440
Uncache = 441
Union = 442
Unnest = 443
Unpivot = 444
Update = 445
Use = 446
Using = 447
Values = 448
View = 449
SemanticView = 450
Volatile = 451
When = 452
Where = 453
Window = 454
With = 455
Ties = 456
Exclude = 457
No = 458
Others = 459
Unique = 460
UtcDate = 461
UtcTime = 462
UtcTimestamp = 463
VersionSnapshot = 464
TimestampSnapshot = 465
Option = 466
Sink = 467
Source = 468
Analyze = 469
Namespace = 470
Export = 471
As = 472
By = 473
Nulls = 474
Respect = 475
Last = 476
If = 477
Cast = 478
TryCast = 479
SafeCast = 480
Count = 481
Extract = 482
Substring = 483
Trim = 484
Leading = 485
Trailing = 486
Both = 487
Position = 488
Overlaying = 489
Placing = 490
Treat = 491
Within = 492
Group = 493
Order = 494
Unbounded = 495
Preceding = 496
Following = 497
Current = 498
Groups = 499
Trigger = 500
Type = 501
Domain = 502
Returns = 503
Body = 504
Increment = 505
Minvalue = 506
Maxvalue = 507
Start = 508
Cycle = 509
NoCycle = 510
Prior = 511
Generated = 512
Identity = 513
Always = 514
Measures = 515
Pattern = 516
Define = 517
Running = 518
Owned = 519
After = 520
Before = 521
Instead = 522
Each = 523
Statement = 524
Referencing = 525
Old = 526
New = 527
Of = 528
Check = 529
Authorization = 530
Restart = 531
Eof = 532
Implementations§
Source§impl TokenType
impl TokenType
Sourcepub fn is_keyword(&self) -> bool
pub fn is_keyword(&self) -> bool
Check if this token type is a keyword that can be used as an identifier in certain contexts
Sourcepub fn is_comparison(&self) -> bool
pub fn is_comparison(&self) -> bool
Check if this token type is a comparison operator
Sourcepub fn is_arithmetic(&self) -> bool
pub fn is_arithmetic(&self) -> bool
Check if this token type is an arithmetic operator
Trait Implementations§
impl Copy for TokenType
Source§impl<'de> Deserialize<'de> for TokenType
impl<'de> Deserialize<'de> for TokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TokenType
impl StructuralPartialEq for TokenType
Auto Trait Implementations§
impl Freeze for TokenType
impl RefUnwindSafe for TokenType
impl Send for TokenType
impl Sync for TokenType
impl Unpin for TokenType
impl UnsafeUnpin for TokenType
impl UnwindSafe for TokenType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more