Row and Array Comparisons (IN, NOT_IN).

This commit is contained in:
zer0sub 2019-06-04 11:52:37 +02:00
parent d69c67569a
commit 384c0c67f5
19 changed files with 170 additions and 231 deletions

View file

@ -34,7 +34,7 @@ RETURNING table1.col1 AS "table1.col1";
}
//func (s *StmtSuite) TestUpdateNilColumn(c *gc.C) {
// stmt := table1.UPDATE().SET(nil, Literal(1))
// stmt := table1.UPDATE().SET(nil, literal(1))
// _, err := stmt.String()
// c.Assert(err, gc.NotNil)
//}
@ -46,13 +46,13 @@ RETURNING table1.col1 AS "table1.col1";
//}
//
//func (s *StmtSuite) TestUpdateUnconditionally(c *gc.C) {
// stmt := table1.UPDATE().SET(table1Col1, Literal(1))
// stmt := table1.UPDATE().SET(table1Col1, literal(1))
// _, err := stmt.String()
// c.Assert(err, gc.NotNil)
//}
//
//func (s *StmtSuite) TestUpdateSingleValue(c *gc.C) {
// stmt := table1.UPDATE().SET(table1Col1, Literal(1))
// stmt := table1.UPDATE().SET(table1Col1, literal(1))
// stmt.WHERE(EqString(table1ColFloat, 2))
// sql, err := stmt.String()
// c.Assert(err, gc.IsNil)
@ -64,7 +64,7 @@ RETURNING table1.col1 AS "table1.col1";
//}
//
//func (s *StmtSuite) TestUpdateUsingDeferredLookupColumns(c *gc.C) {
// stmt := table1.UPDATE().SET(table1.C("col1"), Literal(1))
// stmt := table1.UPDATE().SET(table1.C("col1"), literal(1))
// stmt.WHERE(EqString(table1ColFloat, 2))
// sql, err := stmt.String()
// c.Assert(err, gc.IsNil)
@ -77,8 +77,8 @@ RETURNING table1.col1 AS "table1.col1";
//
//func (s *StmtSuite) TestUpdateMultiValues(c *gc.C) {
// stmt := table1.UPDATE()
// stmt.SET(table1Col1, Literal(1))
// stmt.SET(table1ColFloat, Literal(2))
// stmt.SET(table1Col1, literal(1))
// stmt.SET(table1ColFloat, literal(2))
// stmt.WHERE(EqString(table1ColFloat, 3))
// sql, err := stmt.String()
// c.Assert(err, gc.IsNil)
@ -92,7 +92,7 @@ RETURNING table1.col1 AS "table1.col1";
//}
//
//func (s *StmtSuite) TestUpdateWithOrderBy(c *gc.C) {
// stmt := table1.UPDATE().SET(table1Col1, Literal(1))
// stmt := table1.UPDATE().SET(table1Col1, literal(1))
// stmt.WHERE(EqString(table1ColFloat, 2))
// stmt.ORDER_BY(table1ColFloat)
// sql, err := stmt.String()
@ -108,7 +108,7 @@ RETURNING table1.col1 AS "table1.col1";
//}
//
//func (s *StmtSuite) TestUpdateWithLimit(c *gc.C) {
// stmt := table1.UPDATE().SET(table1Col1, Literal(1))
// stmt := table1.UPDATE().SET(table1Col1, literal(1))
// stmt.WHERE(EqString(table1ColFloat, 2))
// stmt.LIMIT(5)
// sql, err := stmt.String()