Skip to content

Commit 872127d

Browse files
committed
All tests pass (for now)
1 parent fe5d5c3 commit 872127d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

internal/sql/ast/a_expr.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ func (n *A_Expr) Format(buf *TrackedBuffer) {
1818
}
1919
buf.astFormat(n.Lexpr)
2020
buf.WriteString(" ")
21-
if n.Kind == A_Expr_Kind_IN {
21+
switch n.Kind {
22+
case A_Expr_Kind_IN:
2223
buf.WriteString(" IN (")
2324
buf.astFormat(n.Rexpr)
2425
buf.WriteString(")")
25-
} else {
26+
case A_Expr_Kind_LIKE:
27+
buf.WriteString(" LIKE ")
28+
buf.astFormat(n.Rexpr)
29+
default:
2630
buf.astFormat(n.Name)
2731
buf.WriteString(" ")
2832
buf.astFormat(n.Rexpr)

internal/sql/ast/a_expr_kind.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ package ast
33
type A_Expr_Kind uint
44

55
const (
6-
A_Expr_Kind_IN A_Expr_Kind = 7
6+
A_Expr_Kind_IN A_Expr_Kind = 7
7+
A_Expr_Kind_LIKE A_Expr_Kind = 8
78
)
89

910
func (n *A_Expr_Kind) Pos() int {

0 commit comments

Comments
 (0)