#[repr(u16)]pub enum TokenType {
Show 532 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,
Preserve = 250,
Connect = 251,
ConnectBy = 252,
Constraint = 253,
Copy = 254,
Create = 255,
Cross = 256,
Cube = 257,
CurrentDate = 258,
CurrentDateTime = 259,
CurrentSchema = 260,
CurrentTime = 261,
CurrentTimestamp = 262,
CurrentUser = 263,
CurrentRole = 264,
CurrentCatalog = 265,
Declare = 266,
Default = 267,
Delete = 268,
Desc = 269,
Describe = 270,
Detach = 271,
Dictionary = 272,
Distinct = 273,
Distribute = 274,
DistributeBy = 275,
Div = 276,
Drop = 277,
Else = 278,
End = 279,
Escape = 280,
Except = 281,
Execute = 282,
Exists = 283,
False = 284,
Fetch = 285,
File = 286,
FileFormat = 287,
Filter = 288,
Final = 289,
First = 290,
For = 291,
Force = 292,
ForeignKey = 293,
Format = 294,
From = 295,
Full = 296,
Function = 297,
Get = 298,
Glob = 299,
Global = 300,
Grant = 301,
GroupBy = 302,
GroupingSets = 303,
Having = 304,
Hint = 305,
Ignore = 306,
ILike = 307,
In = 308,
Index = 309,
IndexedBy = 310,
Inner = 311,
Input = 312,
Insert = 313,
Install = 314,
Intersect = 315,
Interval = 316,
Into = 317,
Inpath = 318,
InputFormat = 319,
Introducer = 320,
IRLike = 321,
Is = 322,
IsNull = 323,
Join = 324,
JoinMarker = 325,
Keep = 326,
Key = 327,
Kill = 328,
Lambda = 329,
Language = 330,
Lateral = 331,
Left = 332,
Like = 333,
NotLike = 334,
NotILike = 335,
NotRLike = 336,
NotIRLike = 337,
Limit = 338,
List = 339,
Load = 340,
Local = 341,
Lock = 342,
Map = 343,
Match = 344,
MatchCondition = 345,
MatchRecognize = 346,
MemberOf = 347,
Materialized = 348,
Merge = 349,
Mod = 350,
Model = 351,
Natural = 352,
Next = 353,
NoAction = 354,
Nothing = 355,
NotNull = 356,
Null = 357,
ObjectIdentifier = 358,
Offset = 359,
On = 360,
Only = 361,
Operator = 362,
OrderBy = 363,
OrderSiblingsBy = 364,
Ordered = 365,
Ordinality = 366,
Out = 367,
Outer = 368,
Output = 369,
Over = 370,
Overlaps = 371,
Overwrite = 372,
Partition = 373,
PartitionBy = 374,
Percent = 375,
Pivot = 376,
Placeholder = 377,
Positional = 378,
Pragma = 379,
Prewhere = 380,
PrimaryKey = 381,
Procedure = 382,
Properties = 383,
PseudoType = 384,
Put = 385,
Qualify = 386,
Quote = 387,
QDColon = 388,
Range = 389,
Recursive = 390,
Refresh = 391,
Rename = 392,
Replace = 393,
Returning = 394,
Revoke = 395,
References = 396,
Restrict = 397,
Right = 398,
RLike = 399,
Rollback = 400,
Rollup = 401,
Row = 402,
Rows = 403,
Select = 404,
Semi = 405,
Savepoint = 406,
Separator = 407,
Sequence = 408,
Serde = 409,
SerdeProperties = 410,
Set = 411,
Settings = 412,
Show = 413,
Siblings = 414,
SimilarTo = 415,
Some = 416,
Sort = 417,
SortBy = 418,
SoundsLike = 419,
StartWith = 420,
StorageIntegration = 421,
StraightJoin = 422,
Struct = 423,
Summarize = 424,
TableSample = 425,
Sample = 426,
Bernoulli = 427,
System = 428,
Block = 429,
Seed = 430,
Repeatable = 431,
Tag = 432,
Temporary = 433,
Transaction = 434,
To = 435,
Top = 436,
Then = 437,
True = 438,
Truncate = 439,
Uncache = 440,
Union = 441,
Unnest = 442,
Unpivot = 443,
Update = 444,
Use = 445,
Using = 446,
Values = 447,
View = 448,
SemanticView = 449,
Volatile = 450,
When = 451,
Where = 452,
Window = 453,
With = 454,
Ties = 455,
Exclude = 456,
No = 457,
Others = 458,
Unique = 459,
UtcDate = 460,
UtcTime = 461,
UtcTimestamp = 462,
VersionSnapshot = 463,
TimestampSnapshot = 464,
Option = 465,
Sink = 466,
Source = 467,
Analyze = 468,
Namespace = 469,
Export = 470,
As = 471,
By = 472,
Nulls = 473,
Respect = 474,
Last = 475,
If = 476,
Cast = 477,
TryCast = 478,
SafeCast = 479,
Count = 480,
Extract = 481,
Substring = 482,
Trim = 483,
Leading = 484,
Trailing = 485,
Both = 486,
Position = 487,
Overlaying = 488,
Placing = 489,
Treat = 490,
Within = 491,
Group = 492,
Order = 493,
Unbounded = 494,
Preceding = 495,
Following = 496,
Current = 497,
Groups = 498,
Trigger = 499,
Type = 500,
Domain = 501,
Returns = 502,
Body = 503,
Increment = 504,
Minvalue = 505,
Maxvalue = 506,
Start = 507,
Cycle = 508,
NoCycle = 509,
Prior = 510,
Generated = 511,
Identity = 512,
Always = 513,
Measures = 514,
Pattern = 515,
Define = 516,
Running = 517,
Owned = 518,
After = 519,
Before = 520,
Instead = 521,
Each = 522,
Statement = 523,
Referencing = 524,
Old = 525,
New = 526,
Of = 527,
Check = 528,
Authorization = 529,
Restart = 530,
Eof = 531,
}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
Preserve = 250
Connect = 251
ConnectBy = 252
Constraint = 253
Copy = 254
Create = 255
Cross = 256
Cube = 257
CurrentDate = 258
CurrentDateTime = 259
CurrentSchema = 260
CurrentTime = 261
CurrentTimestamp = 262
CurrentUser = 263
CurrentRole = 264
CurrentCatalog = 265
Declare = 266
Default = 267
Delete = 268
Desc = 269
Describe = 270
Detach = 271
Dictionary = 272
Distinct = 273
Distribute = 274
DistributeBy = 275
Div = 276
Drop = 277
Else = 278
End = 279
Escape = 280
Except = 281
Execute = 282
Exists = 283
False = 284
Fetch = 285
File = 286
FileFormat = 287
Filter = 288
Final = 289
First = 290
For = 291
Force = 292
ForeignKey = 293
Format = 294
From = 295
Full = 296
Function = 297
Get = 298
Glob = 299
Global = 300
Grant = 301
GroupBy = 302
GroupingSets = 303
Having = 304
Hint = 305
Ignore = 306
ILike = 307
In = 308
Index = 309
IndexedBy = 310
Inner = 311
Input = 312
Insert = 313
Install = 314
Intersect = 315
Interval = 316
Into = 317
Inpath = 318
InputFormat = 319
Introducer = 320
IRLike = 321
Is = 322
IsNull = 323
Join = 324
JoinMarker = 325
Keep = 326
Key = 327
Kill = 328
Lambda = 329
Language = 330
Lateral = 331
Left = 332
Like = 333
NotLike = 334
NotILike = 335
NotRLike = 336
NotIRLike = 337
Limit = 338
List = 339
Load = 340
Local = 341
Lock = 342
Map = 343
Match = 344
MatchCondition = 345
MatchRecognize = 346
MemberOf = 347
Materialized = 348
Merge = 349
Mod = 350
Model = 351
Natural = 352
Next = 353
NoAction = 354
Nothing = 355
NotNull = 356
Null = 357
ObjectIdentifier = 358
Offset = 359
On = 360
Only = 361
Operator = 362
OrderBy = 363
OrderSiblingsBy = 364
Ordered = 365
Ordinality = 366
Out = 367
Outer = 368
Output = 369
Over = 370
Overlaps = 371
Overwrite = 372
Partition = 373
PartitionBy = 374
Percent = 375
Pivot = 376
Placeholder = 377
Positional = 378
Pragma = 379
Prewhere = 380
PrimaryKey = 381
Procedure = 382
Properties = 383
PseudoType = 384
Put = 385
Qualify = 386
Quote = 387
QDColon = 388
Range = 389
Recursive = 390
Refresh = 391
Rename = 392
Replace = 393
Returning = 394
Revoke = 395
References = 396
Restrict = 397
Right = 398
RLike = 399
Rollback = 400
Rollup = 401
Row = 402
Rows = 403
Select = 404
Semi = 405
Savepoint = 406
Separator = 407
Sequence = 408
Serde = 409
SerdeProperties = 410
Set = 411
Settings = 412
Show = 413
Siblings = 414
SimilarTo = 415
Some = 416
Sort = 417
SortBy = 418
SoundsLike = 419
StartWith = 420
StorageIntegration = 421
StraightJoin = 422
Struct = 423
Summarize = 424
TableSample = 425
Sample = 426
Bernoulli = 427
System = 428
Block = 429
Seed = 430
Repeatable = 431
Tag = 432
Temporary = 433
Transaction = 434
To = 435
Top = 436
Then = 437
True = 438
Truncate = 439
Uncache = 440
Union = 441
Unnest = 442
Unpivot = 443
Update = 444
Use = 445
Using = 446
Values = 447
View = 448
SemanticView = 449
Volatile = 450
When = 451
Where = 452
Window = 453
With = 454
Ties = 455
Exclude = 456
No = 457
Others = 458
Unique = 459
UtcDate = 460
UtcTime = 461
UtcTimestamp = 462
VersionSnapshot = 463
TimestampSnapshot = 464
Option = 465
Sink = 466
Source = 467
Analyze = 468
Namespace = 469
Export = 470
As = 471
By = 472
Nulls = 473
Respect = 474
Last = 475
If = 476
Cast = 477
TryCast = 478
SafeCast = 479
Count = 480
Extract = 481
Substring = 482
Trim = 483
Leading = 484
Trailing = 485
Both = 486
Position = 487
Overlaying = 488
Placing = 489
Treat = 490
Within = 491
Group = 492
Order = 493
Unbounded = 494
Preceding = 495
Following = 496
Current = 497
Groups = 498
Trigger = 499
Type = 500
Domain = 501
Returns = 502
Body = 503
Increment = 504
Minvalue = 505
Maxvalue = 506
Start = 507
Cycle = 508
NoCycle = 509
Prior = 510
Generated = 511
Identity = 512
Always = 513
Measures = 514
Pattern = 515
Define = 516
Running = 517
Owned = 518
After = 519
Before = 520
Instead = 521
Each = 522
Statement = 523
Referencing = 524
Old = 525
New = 526
Of = 527
Check = 528
Authorization = 529
Restart = 530
Eof = 531
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§
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 Copy for TokenType
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 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