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

@ -80,13 +80,7 @@ func TestReservedWordEscaped(t *testing.T) {
var table1ColVariadic = IntervalColumn("VARIADIC")
var table1ColProcedure = IntervalColumn("procedure")
_ = NewTable(
"db",
"table1",
table1ColUser,
table1ColVariadic,
table1ColProcedure,
)
_ = NewTable("db", "table1", "", table1ColUser, table1ColVariadic, table1ColProcedure)
assertSerialize(t, table1ColUser, `table1."user"`)
assertSerialize(t, table1ColVariadic, `table1."VARIADIC"`)