Add ROW constructor and IN/EXISTS operator.
This commit is contained in:
parent
08e4392278
commit
3367df247c
18 changed files with 183 additions and 565 deletions
|
|
@ -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")+"%")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue