Renamed generated schema func to UseSchema.
This commit is contained in:
parent
04c1a51ba7
commit
1bf48d640a
6 changed files with 46 additions and 41 deletions
|
|
@ -99,10 +99,10 @@ func new{{tableTemplate.TypeName}}Impl(schemaName, tableName, alias string) {{st
|
|||
|
||||
var tableSqlBuilderSetSchemaTemplate = `package {{package}}
|
||||
|
||||
// {{schemaMethodName}} changes all global tables/views with the value returned
|
||||
// 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 {{schemaMethodName}}(schema string) {
|
||||
func UseSchema(schema string) {
|
||||
{{- range .}}
|
||||
{{ .InstanceName }} = {{ .InstanceName }}.FromSchema(schema)
|
||||
{{- end}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue