-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.go
More file actions
192 lines (160 loc) · 5 KB
/
constants.go
File metadata and controls
192 lines (160 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/*
Copyright 2019 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package sqlparser
const (
// Select.Distinct
DistinctStr = "distinct "
StraightJoinHint = "straight_join "
SQLCalcFoundRowsStr = "sql_calc_found_rows "
// Select.Lock
ForUpdateStr = " for update"
ShareModeStr = " lock in share mode"
// Select.Cache
SQLCacheStr = "sql_cache "
SQLNoCacheStr = "sql_no_cache "
// Union.Type
UnionStr = "union"
UnionAllStr = "union all"
UnionDistinctStr = "union distinct"
// DDL strings.
InsertStr = "insert"
ReplaceStr = "replace"
// Set.Scope or Show.Scope
SessionStr = "session"
GlobalStr = "global"
VitessMetadataStr = "vitess_metadata"
VariableStr = "variable"
ImplicitStr = ""
// DDL strings.
CreateStr = "create"
AlterStr = "alter"
DropStr = "drop"
RenameStr = "rename"
TruncateStr = "truncate"
FlushStr = "flush"
CreateVindexStr = "create vindex"
DropVindexStr = "drop vindex"
AddVschemaTableStr = "add vschema table"
DropVschemaTableStr = "drop vschema table"
AddColVindexStr = "on table add vindex"
DropColVindexStr = "on table drop vindex"
AddSequenceStr = "add sequence"
AddAutoIncStr = "add auto_increment"
// Vindex DDL param to specify the owner of a vindex
VindexOwnerStr = "owner"
// Partition strings
ReorganizeStr = "reorganize partition"
// JoinTableExpr.Join
JoinStr = "join"
StraightJoinStr = "straight_join"
LeftJoinStr = "left join"
LeftOuterJoinStr = "left outer join"
RightJoinStr = "right join"
RightOuterJoinStr = "right outer join"
NaturalJoinStr = "natural join"
NaturalLeftJoinStr = "natural left join"
NaturalRightJoinStr = "natural right join"
// Index hints.
UseStr = "use "
IgnoreStr = "ignore "
ForceStr = "force "
// Table Modifiers
TempStr = "temp"
TemporaryStr = "temporary"
// View Modifiers
MaterializedStr = "materialized"
// Where.Type
WhereStr = "where"
HavingStr = "having"
// ComparisonExpr.Operator
EqualStr = "="
LessThanStr = "<"
GreaterThanStr = ">"
LessEqualStr = "<="
GreaterEqualStr = ">="
NotEqualStr = "!="
NullSafeEqualStr = "<=>"
InStr = "in"
NotInStr = "not in"
LikeStr = "like"
NotLikeStr = "not like"
RegexpStr = "regexp"
NotRegexpStr = "not regexp"
JSONExtractOp = "->"
JSONUnquoteExtractOp = "->>"
// RangeCond.Operator
BetweenStr = "between"
NotBetweenStr = "not between"
// IsExpr.Operator
IsNullStr = "is null"
IsNotNullStr = "is not null"
IsTrueStr = "is true"
IsNotTrueStr = "is not true"
IsFalseStr = "is false"
IsNotFalseStr = "is not false"
// BinaryExpr.Operator
BitAndStr = "&"
BitOrStr = "|"
BitXorStr = "^"
PlusStr = "+"
MinusStr = "-"
MultStr = "*"
DivStr = "/"
IntDivStr = "div"
ModStr = "%"
ShiftLeftStr = "<<"
ShiftRightStr = ">>"
// UnaryExpr.Operator
UPlusStr = "+"
UMinusStr = "-"
TildaStr = "~"
BangStr = "!"
BinaryStr = "binary "
UBinaryStr = "_binary "
Utf8mb4Str = "_utf8mb4 "
Utf8Str = "_utf8 "
Latin1Str = "_latin1 "
// this string is "character set" and this comment is required
CharacterSetStr = " character set"
CharsetStr = "charset"
// MatchExpr.Option
BooleanModeStr = " in boolean mode"
NaturalLanguageModeStr = " in natural language mode"
NaturalLanguageModeWithQueryExpansionStr = " in natural language mode with query expansion"
QueryExpansionStr = " with query expansion"
// Order.Direction
AscScr = "asc"
DescScr = "desc"
// SetExpr.Expr, for SET TRANSACTION ... or START TRANSACTION
// TransactionStr is the Name for a SET TRANSACTION statement
TransactionStr = "transaction"
// Transaction isolation levels
ReadUncommitted = "read uncommitted"
ReadCommitted = "read committed"
RepeatableRead = "repeatable read"
Serializable = "serializable"
TxReadOnly = "read only"
TxReadWrite = "read write"
// Explain formats
TreeStr = "tree"
JSONStr = "json"
VitessStr = "vitess"
TraditionalStr = "traditional"
AnalyzeStr = "analyze"
// Auth constants
InteractiveStr = "interactive"
ServiceAccountStr = "serviceaccount"
// Cardinality increase functions
JsonEachStr = "json_each"
JsonArrayElementsTextStr = "json_array_elements_text"
)