2016-06-20 07:22:50 +02:00
|
|
|
{{- $tableNameSingular := .Table.Name | singular | titleCase -}}
|
|
|
|
{{- $tableNamePlural := .Table.Name | plural | titleCase -}}
|
|
|
|
{{- $varNameSingular := .Table.Name | singular | camelCase -}}
|
2016-03-18 12:26:48 +01:00
|
|
|
// {{$tableNamePlural}}All retrieves all records.
|
2016-06-14 16:01:28 +02:00
|
|
|
func {{$tableNamePlural}}(mods ...qm.QueryMod) {{$varNameSingular}}Query {
|
2016-04-19 04:02:32 +02:00
|
|
|
return {{$tableNamePlural}}X(boil.GetDB(), mods...)
|
2016-02-29 12:45:28 +01:00
|
|
|
}
|
2016-04-17 11:25:09 +02:00
|
|
|
|
2016-06-20 01:29:59 +02:00
|
|
|
// {{$tableNamePlural}}X retrieves all the records using an executor.
|
2016-06-14 16:01:28 +02:00
|
|
|
func {{$tableNamePlural}}X(exec boil.Executor, mods ...qm.QueryMod) {{$varNameSingular}}Query {
|
|
|
|
mods = append(mods, qm.Table("{{.Table.Name}}"))
|
2016-04-23 13:54:24 +02:00
|
|
|
return {{$varNameSingular}}Query{NewQueryX(exec, mods...)}
|
2016-04-17 11:25:09 +02:00
|
|
|
}
|