Add schema rename support

Using SchemaFrom("schemaName") it is possible to set SQL builder table to point to a different schema.
This commit is contained in:
go-jet 2021-03-21 17:17:44 +01:00
parent 38776e35ab
commit fae8dde639
17 changed files with 206 additions and 153 deletions

View file

@ -1,7 +1,6 @@
package postgres
import (
"fmt"
"github.com/go-jet/jet/v2/internal/testutils"
. "github.com/go-jet/jet/v2/postgres"
"github.com/go-jet/jet/v2/tests/.gentestdata/jetdb/dvds/enum"
@ -1255,7 +1254,7 @@ OFFSET 20;
LIMIT(10).
OFFSET(20)
fmt.Println(query.DebugSql())
//fmt.Println(query.DebugSql())
testutils.AssertDebugStatementSql(t, query, expectedQuery, float64(100), float64(200), int64(10), int64(20))
@ -1788,7 +1787,7 @@ func TestJoinViewWithTable(t *testing.T) {
Rentals []model.Rental
}
fmt.Println(query.DebugSql())
//fmt.Println(query.DebugSql())
err := query.Query(db, &dest)
require.NoError(t, err)