a957bc3836
* Added drivername to tplData
16 lines
623 B
Smarty
16 lines
623 B
Smarty
{{- $tableNameSingular := titleCaseSingular .Table.Name -}}
|
|
{{- $tableNamePlural := titleCasePlural .Table.Name -}}
|
|
{{- $varNameSingular := camelCaseSingular .Table.Name -}}
|
|
type {{$varNameSingular}}Query struct {
|
|
*boil.Query
|
|
}
|
|
|
|
// {{$tableNamePlural}}All retrieves all records.
|
|
func {{$tableNamePlural}}(mods ...qs.QueryMod) {{$varNameSingular}}Query {
|
|
return {{$tableNamePlural}}X(boil.GetDB(), mods...)
|
|
}
|
|
|
|
func {{$tableNamePlural}}X(exec boil.Executor, mods ...qs.QueryMod) {{$varNameSingular}}Query {
|
|
mods = append(mods, qs.Table("{{.Table.Name}}"))
|
|
return {{$varNameSingular}}Query{NewQueryX(exec, mods...)}
|
|
}
|