Add SQLBuilder support for SQLite databases.

This commit is contained in:
go-jet 2021-10-21 13:39:24 +02:00
parent d197956271
commit e8f4c2b31b
50 changed files with 5851 additions and 75 deletions

View file

@ -0,0 +1,31 @@
package sqlite
import (
"testing"
)
func TestSelectSets(t *testing.T) {
select1 := SELECT(table1ColBool).FROM(table1)
select2 := SELECT(table2ColBool).FROM(table2)
assertStatementSql(t, select1.UNION(select2), `
SELECT table1.col_bool AS "table1.col_bool"
FROM db.table1
UNION
SELECT table2.col_bool AS "table2.col_bool"
FROM db.table2;
`)
assertStatementSql(t, select1.UNION_ALL(select2), `
SELECT table1.col_bool AS "table1.col_bool"
FROM db.table1
UNION ALL
SELECT table2.col_bool AS "table2.col_bool"
FROM db.table2;
`)
}