Add ROW constructor and IN/EXISTS operator.

This commit is contained in:
zer0sub 2019-05-05 18:03:30 +02:00
parent 08e4392278
commit 3367df247c
18 changed files with 183 additions and 565 deletions

View file

@ -44,25 +44,6 @@ func (s *ExprSuite) TestConjunctExprSingleElement(c *gc.C) {
c.Assert(sql, gc.Equals, "table1.col1=1")
}
func (s *ExprSuite) TestTupleExpr(c *gc.C) {
expr := Tuple()
buf := &bytes.Buffer{}
err := expr.Serialize(buf)
c.Assert(err, gc.NotNil)
expr = Tuple(table1Col1, Literal(1), Literal("five"))
err = expr.Serialize(buf)
c.Assert(err, gc.IsNil)
sql := buf.String()
c.Assert(
sql,
gc.Equals,
"(table1.col1,1,'five')")
}
func (s *ExprSuite) TestLikeExpr(c *gc.C) {
expr := LikeL(table1Col1, EscapeForLike("%my_prefix")+"%")