Fix integration tests.

This commit is contained in:
zer0sub 2019-05-01 18:23:19 +02:00
parent eccc17dc8a
commit 5c05214ba1
5 changed files with 102 additions and 18 deletions

View file

@ -81,8 +81,8 @@ func (us *setStatementImpl) OFFSET(offset int64) SetStatement {
}
func (us *setStatementImpl) Serialize(out *queryData, options ...serializeOption) error {
if len(us.selects) == 0 {
return errors.Newf("UNION statement must have at least one SELECT")
if len(us.selects) < 2 {
return errors.Newf("UNION statement must have at least two SELECT statements.")
}
out.WriteString("(")