09ed5709e5
- The old templates used to output \n\n after each run, with the previous changes this is no longer the case and as such the templates all must be formatted correctly.
12 lines
590 B
Smarty
12 lines
590 B
Smarty
{{- $tableNamePlural := .Table.Name | plural | titleCase -}}
|
|
{{- $varNameSingular := .Table.Name | singular | camelCase}}
|
|
// {{$tableNamePlural}}G retrieves all records.
|
|
func {{$tableNamePlural}}G(mods ...qm.QueryMod) {{$varNameSingular}}Query {
|
|
return {{$tableNamePlural}}(boil.GetDB(), mods...)
|
|
}
|
|
|
|
// {{$tableNamePlural}} retrieves all the records using an executor.
|
|
func {{$tableNamePlural}}(exec boil.Executor, mods ...qm.QueryMod) {{$varNameSingular}}Query {
|
|
mods = append(mods, qm.From("{{.Table.Name | .SchemaTable}}"))
|
|
return {{$varNameSingular}}Query{NewQuery(exec, mods...)}
|
|
}
|