Changed SetSchema to UseSchema

This commit is contained in:
Jay 2022-12-04 20:33:55 +05:30
parent 3f9ae1cabb
commit 04c1a51ba7
5 changed files with 33 additions and 12 deletions

View file

@ -322,7 +322,10 @@ var tableSetSchemaFile = `
package table
func SetDvdsSchema(schema string) {
// UseDvdsSchema changes all global tables/views with the value returned
// returned by calling FromSchema on them. Passing an empty string to this function
// will cause queries to be generated without any table/view alias.
func UseDvdsSchema(schema string) {
Actor = Actor.FromSchema(schema)
Address = Address.FromSchema(schema)
Category = Category.FromSchema(schema)
@ -460,7 +463,10 @@ var viewSetSchemaFile = `
package view
func SetDvdsSchema(schema string) {
// UseDvdsSchema changes all global tables/views with the value returned
// returned by calling FromSchema on them. Passing an empty string to this function
// will cause queries to be generated without any table/view alias.
func UseDvdsSchema(schema string) {
ActorInfo = ActorInfo.FromSchema(schema)
CustomerList = CustomerList.FromSchema(schema)
FilmList = FilmList.FromSchema(schema)

View file

@ -400,7 +400,10 @@ var actorSQLBuilderTableFile = `
package table
func SetDvdsSchema(schema string) {
// UseDvdsSchema changes all global tables/views with the value returned
// returned by calling FromSchema on them. Passing an empty string to this function
// will cause queries to be generated without any table/view alias.
func UseDvdsSchema(schema string) {
Film = Film.FromSchema(schema)
Address = Address.FromSchema(schema)
Actor = Actor.FromSchema(schema)
@ -538,7 +541,10 @@ var actorInfoSQLBuilderViewFile = `
package view
func SetDvdsSchema(schema string) {
// UseDvdsSchema changes all global tables/views with the value returned
// returned by calling FromSchema on them. Passing an empty string to this function
// will cause queries to be generated without any table/view alias.
func UseDvdsSchema(schema string) {
ActorInfo = ActorInfo.FromSchema(schema)
CustomerList = CustomerList.FromSchema(schema)
FilmList = FilmList.FromSchema(schema)

View file

@ -238,7 +238,10 @@ const actorSQLBuilderTableFile = `
package table
func SetSchema(schema string) {
// UseSchema changes all global tables/views with the value returned
// returned by calling FromSchema on them. Passing an empty string to this function
// will cause queries to be generated without any table/view alias.
func UseSchema(schema string) {
Actor = Actor.FromSchema(schema)
Address = Address.FromSchema(schema)
Category = Category.FromSchema(schema)
@ -367,7 +370,10 @@ const filmListSQLBuilderViewFile = `
package view
func SetSchema(schema string) {
// UseSchema changes all global tables/views with the value returned
// returned by calling FromSchema on them. Passing an empty string to this function
// will cause queries to be generated without any table/view alias.
func UseSchema(schema string) {
CustomerList = CustomerList.FromSchema(schema)
FilmList = FilmList.FromSchema(schema)
SalesByFilmCategory = SalesByFilmCategory.FromSchema(schema)