SQL returns the SQL representation of this BETWEEN expression. The NOT modifier is included when BetweenExpression.Not is true.
()
| 266 | // SQL returns the SQL representation of this BETWEEN expression. |
| 267 | // The NOT modifier is included when BetweenExpression.Not is true. |
| 268 | func (b *BetweenExpression) SQL() string { |
| 269 | if b == nil { |
| 270 | return "" |
| 271 | } |
| 272 | not := "" |
| 273 | if b.Not { |
| 274 | not = "NOT " |
| 275 | } |
| 276 | return fmt.Sprintf("%s %sBETWEEN %s AND %s", exprSQL(b.Expr), not, exprSQL(b.Lower), exprSQL(b.Upper)) |
| 277 | } |
| 278 | |
| 279 | // SQL returns the SQL representation of this IN expression. |
| 280 | // The NOT modifier is included when InExpression.Not is true. |