2016-06-20 07:22:50 +02:00
|
|
|
{{- $tableNamePlural := .Table.Name | plural | titleCase -}}
|
2017-05-09 21:30:04 +02:00
|
|
|
{{- $tableNameSingular := .Table.Name | singular | titleCase}}
|
2016-08-01 07:10:10 +02:00
|
|
|
// {{$tableNamePlural}}G retrieves all records.
|
2017-05-09 21:30:04 +02:00
|
|
|
func {{$tableNamePlural}}G(mods ...qm.QueryMod) {{$tableNameSingular}}Query {
|
2016-09-14 10:08:30 +02:00
|
|
|
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.
|
2017-05-09 21:30:04 +02:00
|
|
|
func {{$tableNamePlural}}(exec boil.Executor, mods ...qm.QueryMod) {{$tableNameSingular}}Query {
|
2016-09-14 10:08:30 +02:00
|
|
|
mods = append(mods, qm.From("{{.Table.Name | .SchemaTable}}"))
|
2017-05-09 21:30:04 +02:00
|
|
|
return {{$tableNameSingular}}Query{NewQuery(exec, mods...)}
|
2016-04-17 11:25:09 +02:00
|
|
|
}
|