sqlboiler/cmds/templates/struct.tpl
Aaron 64ec06b4b4 Rename some functions.
- Use more efficient implementation of the template funcs.
2016-03-01 08:34:57 -08:00

8 lines
313 B
Smarty

{{- $tableName := .TableName -}}
// {{titleCase $tableName}} is an object representing the database table.
type {{titleCase $tableName}} struct {
{{range $key, $value := .TableData -}}
{{titleCase $value.Name}} {{$value.Type}} `db:"{{makeDBName $tableName $value.Name}}" json:"{{$value.Name}}"`
{{end -}}
}