sqlboiler/templates/struct.tpl
Patrick O'brien 20720b2cc0 Changed SQLBoiler init method
* Now uses maps to load commands
* Map for custom run handlers
* Map for template functions
* Streamlined cmd creation process
2016-02-29 15:49:26 +10:00

8 lines
340 B
Smarty

{{- $tableName := .TableName -}}
// {{makeGoColName $tableName}} is an object representing the database table.
type {{makeGoColName $tableName}} struct {
{{range $key, $value := .TableData -}}
{{makeGoColName $value.ColName}} {{$value.ColType}} `db:"{{makeDBColName $tableName $value.ColName}}" json:"{{$value.ColName}}"`
{{end -}}
}