2016-06-20 07:22:50 +02:00
|
|
|
{{- $tableNameSingular := .Table.Name | singular | titleCase -}}
|
|
|
|
{{- $tableNamePlural := .Table.Name | plural | titleCase -}}
|
|
|
|
{{- $varNameSingular := .Table.Name | singular | camelCase -}}
|
2016-08-01 07:10:10 +02:00
|
|
|
// {{$tableNamePlural}}G retrieves all records.
|
|
|
|
func {{$tableNamePlural}}G(mods ...qm.QueryMod) {{$varNameSingular}}Query {
|
|
|
|
return {{$tableNamePlural}}(boil.GetDB(), mods...)
|
2016-02-29 12:45:28 +01:00
|
|
|
}
|
2016-04-17 11:25:09 +02:00
|
|
|
|
2016-08-01 07:10:10 +02:00
|
|
|
// {{$tableNamePlural}} retrieves all the records using an executor.
|
|
|
|
func {{$tableNamePlural}}(exec boil.Executor, mods ...qm.QueryMod) {{$varNameSingular}}Query {
|
2016-09-12 07:30:25 +02:00
|
|
|
mods = append(mods, qm.From("{{.Table.Name | .SchemaTable}}"))
|
2016-08-01 07:10:10 +02:00
|
|
|
return {{$varNameSingular}}Query{NewQuery(exec, mods...)}
|
2016-04-17 11:25:09 +02:00
|
|
|
}
|