Add support for UNION statements
This commit is contained in:
parent
fef8f0ef83
commit
8a3521a016
8 changed files with 140 additions and 219 deletions
|
|
@ -463,8 +463,8 @@ func (s *StmtSuite) TestUnionSelectWithMismatchedColumns(c *gc.C) {
|
|||
|
||||
q := Union(select_queries...)
|
||||
q = q.Where(And(LtL(table1Col1, 1000), GtL(table1Col1, 15)))
|
||||
q = q.OrderBy(Desc(table1Col4), Asc(table1Col3))
|
||||
q = q.Limit(5)
|
||||
q = q.ORDER_BY(Desc(table1Col4), Asc(table1Col3))
|
||||
q = q.LIMIT(5)
|
||||
|
||||
_, err := q.String()
|
||||
|
||||
|
|
@ -502,8 +502,8 @@ func (s *StmtSuite) TestComplicatedUnionSelectWithWhereStatement(c *gc.C) {
|
|||
q := Union(select_queries...)
|
||||
q = q.Where(And(LtL(table1Col1, 1000), GtL(table1Col1, 15)))
|
||||
|
||||
q = q.OrderBy(Desc(table1Col4), Asc(table1Col3))
|
||||
q = q.Limit(5)
|
||||
q = q.ORDER_BY(Desc(table1Col4), Asc(table1Col3))
|
||||
q = q.LIMIT(5)
|
||||
q = q.GroupBy(table1Col4)
|
||||
|
||||
sql, err := q.String()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue