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 753d3bac9a
commit b375733dfa
17 changed files with 206 additions and 153 deletions

View file

@ -2,7 +2,6 @@ package mysql
import (
"context"
"fmt"
"github.com/go-jet/jet/v2/internal/testutils"
. "github.com/go-jet/jet/v2/mysql"
"github.com/go-jet/jet/v2/tests/.gentestdata/mysql/dvds/table"
@ -193,7 +192,7 @@ SET url = 'http://www.duckduckgo.com',
description = NULL
WHERE link.id = 201;
`
fmt.Println(stmt.DebugSql())
//fmt.Println(stmt.DebugSql())
testutils.AssertDebugStatementSql(t, stmt, expectedSQL, "http://www.duckduckgo.com", "DuckDuckGo", nil, int64(201))
testutils.AssertExec(t, stmt, db)