Added a global method to table generation (#79)

This commit is contained in:
Jay 2022-12-01 11:54:14 +05:30
parent c9e627d333
commit 471499ea00
2 changed files with 47 additions and 3 deletions

View file

@ -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 }}