Add StringColumn type and expression
Add Projection type Alias refactoring More numeric operations
This commit is contained in:
parent
033ab1d0da
commit
b2f84d048c
16 changed files with 350 additions and 199 deletions
|
|
@ -11,7 +11,7 @@ type {{.ToGoStructName}} struct {
|
|||
|
||||
//Columns
|
||||
{{- range .Columns}}
|
||||
{{.ToGoFieldName}} sqlbuilder.NonAliasColumn
|
||||
{{.ToGoFieldName}} *sqlbuilder.{{.ToSqlBuilderColumnType}}
|
||||
{{- end}}
|
||||
|
||||
AllColumns sqlbuilder.ColumnList
|
||||
|
|
@ -22,7 +22,7 @@ var {{.ToGoVarName}} = new{{.ToGoStructName}}()
|
|||
func new{{.ToGoStructName}}() *{{.ToGoStructName}} {
|
||||
var (
|
||||
{{- range .Columns}}
|
||||
{{.ToGoVarName}} = sqlbuilder.IntColumn("{{.Name}}", {{if .IsNullable}}sqlbuilder.Nullable{{else}}sqlbuilder.NotNullable{{end}})
|
||||
{{.ToGoVarName}} = sqlbuilder.New{{.ToSqlBuilderColumnType}}("{{.Name}}", {{if .IsNullable}}sqlbuilder.Nullable{{else}}sqlbuilder.NotNullable{{end}})
|
||||
{{- end}}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue