Added a global method to table generation (#79)
This commit is contained in:
parent
c9e627d333
commit
471499ea00
2 changed files with 47 additions and 3 deletions
|
|
@ -97,6 +97,14 @@ func new{{tableTemplate.TypeName}}Impl(schemaName, tableName, alias string) {{st
|
|||
}
|
||||
`
|
||||
|
||||
var tableSqlBuilderSetSchemaTemplate = `
|
||||
func SetSchema(schema string) {
|
||||
{{- range .}}
|
||||
{{ .InstanceName }} = {{ .InstanceName }}.FromSchema(schema)
|
||||
{{- end}}
|
||||
}
|
||||
`
|
||||
|
||||
var tableModelFileTemplate = `package {{package}}
|
||||
|
||||
{{ with modelImports }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue