@@ -135,91 +135,91 @@ func (stmt *WhereStmt) Or(cond string, args ...any) *WhereStmt {
135
135
// AndIsNull 指定 WHERE ... AND col IS NULL
136
136
func (stmt * WhereStmt ) AndIsNull (col string ) * WhereStmt {
137
137
stmt .writeAnd (true )
138
- stmt .builder .QuoteKey (col ).WString (" IS NULL " )
138
+ stmt .builder .QuoteColumn (col ).WString (" IS NULL " )
139
139
return stmt
140
140
}
141
141
142
142
// OrIsNull 指定 WHERE ... OR col IS NULL
143
143
func (stmt * WhereStmt ) OrIsNull (col string ) * WhereStmt {
144
144
stmt .writeAnd (false )
145
- stmt .builder .QuoteKey (col ).WString (" IS NULL " )
145
+ stmt .builder .QuoteColumn (col ).WString (" IS NULL " )
146
146
return stmt
147
147
}
148
148
149
149
// AndIsNotNull 指定 WHERE ... AND col IS NOT NULL
150
150
func (stmt * WhereStmt ) AndIsNotNull (col string ) * WhereStmt {
151
151
stmt .writeAnd (true )
152
- stmt .builder .QuoteKey (col ).WString (" IS NOT NULL " )
152
+ stmt .builder .QuoteColumn (col ).WString (" IS NOT NULL " )
153
153
return stmt
154
154
}
155
155
156
156
// OrIsNotNull 指定 WHERE ... OR col IS NOT NULL
157
157
func (stmt * WhereStmt ) OrIsNotNull (col string ) * WhereStmt {
158
158
stmt .writeAnd (false )
159
- stmt .builder .QuoteKey (col ).WString (" IS NOT NULL " )
159
+ stmt .builder .QuoteColumn (col ).WString (" IS NOT NULL " )
160
160
return stmt
161
161
}
162
162
163
163
// AndBetween 指定 WHERE ... AND col BETWEEN v1 AND v2
164
164
func (stmt * WhereStmt ) AndBetween (col string , v1 , v2 any ) * WhereStmt {
165
165
stmt .writeAnd (true )
166
- stmt .builder .QuoteKey (col ).WString (" BETWEEN ? AND ? " )
166
+ stmt .builder .QuoteColumn (col ).WString (" BETWEEN ? AND ? " )
167
167
stmt .args = append (stmt .args , v1 , v2 )
168
168
return stmt
169
169
}
170
170
171
171
// OrBetween 指定 WHERE ... OR col BETWEEN v1 AND v2
172
172
func (stmt * WhereStmt ) OrBetween (col string , v1 , v2 any ) * WhereStmt {
173
173
stmt .writeAnd (false )
174
- stmt .builder .QuoteKey (col ).WString (" BETWEEN ? AND ? " )
174
+ stmt .builder .QuoteColumn (col ).WString (" BETWEEN ? AND ? " )
175
175
stmt .args = append (stmt .args , v1 , v2 )
176
176
return stmt
177
177
}
178
178
179
179
// AndNotBetween 指定 WHERE ... AND col NOT BETWEEN v1 AND v2
180
180
func (stmt * WhereStmt ) AndNotBetween (col string , v1 , v2 any ) * WhereStmt {
181
181
stmt .writeAnd (true )
182
- stmt .builder .QuoteKey (col ).WString (" NOT BETWEEN ? AND ? " )
182
+ stmt .builder .QuoteColumn (col ).WString (" NOT BETWEEN ? AND ? " )
183
183
stmt .args = append (stmt .args , v1 , v2 )
184
184
return stmt
185
185
}
186
186
187
187
// OrNotBetween 指定 WHERE ... OR col BETWEEN v1 AND v2
188
188
func (stmt * WhereStmt ) OrNotBetween (col string , v1 , v2 any ) * WhereStmt {
189
189
stmt .writeAnd (false )
190
- stmt .builder .QuoteKey (col ).WString (" NOT BETWEEN ? AND ? " )
190
+ stmt .builder .QuoteColumn (col ).WString (" NOT BETWEEN ? AND ? " )
191
191
stmt .args = append (stmt .args , v1 , v2 )
192
192
return stmt
193
193
}
194
194
195
195
// AndLike 指定 WHERE ... AND col LIKE content
196
196
func (stmt * WhereStmt ) AndLike (col string , content any ) * WhereStmt {
197
197
stmt .writeAnd (true )
198
- stmt .builder .QuoteKey (col ).WString (" LIKE ?" )
198
+ stmt .builder .QuoteColumn (col ).WString (" LIKE ?" )
199
199
stmt .args = append (stmt .args , content )
200
200
return stmt
201
201
}
202
202
203
203
// OrLike 指定 WHERE ... OR col LIKE content
204
204
func (stmt * WhereStmt ) OrLike (col string , content any ) * WhereStmt {
205
205
stmt .writeAnd (false )
206
- stmt .builder .QuoteKey (col ).WString (" LIKE ?" )
206
+ stmt .builder .QuoteColumn (col ).WString (" LIKE ?" )
207
207
stmt .args = append (stmt .args , content )
208
208
return stmt
209
209
}
210
210
211
211
// AndNotLike 指定 WHERE ... AND col NOT LIKE content
212
212
func (stmt * WhereStmt ) AndNotLike (col string , content any ) * WhereStmt {
213
213
stmt .writeAnd (true )
214
- stmt .builder .QuoteKey (col ).WString (" NOT LIKE ?" )
214
+ stmt .builder .QuoteColumn (col ).WString (" NOT LIKE ?" )
215
215
stmt .args = append (stmt .args , content )
216
216
return stmt
217
217
}
218
218
219
219
// OrNotLike 指定 WHERE ... OR col NOT LIKE content
220
220
func (stmt * WhereStmt ) OrNotLike (col string , content any ) * WhereStmt {
221
221
stmt .writeAnd (false )
222
- stmt .builder .QuoteKey (col ).WString (" NOT LIKE ?" )
222
+ stmt .builder .QuoteColumn (col ).WString (" NOT LIKE ?" )
223
223
stmt .args = append (stmt .args , content )
224
224
return stmt
225
225
}
@@ -250,7 +250,7 @@ func (stmt *WhereStmt) in(and, not bool, col string, v ...any) *WhereStmt {
250
250
}
251
251
252
252
stmt .writeAnd (and )
253
- stmt .builder .QuoteKey (col )
253
+ stmt .builder .QuoteColumn (col )
254
254
255
255
if not {
256
256
stmt .builder .WString (" NOT" )
0 commit comments