2016-03-23 07:18:41 +01:00
|
|
|
{{- $tableNameSingular := titleCaseSingular .Table.Name -}}
|
|
|
|
{{- $tableNamePlural := titleCasePlural .Table.Name -}}
|
2016-04-17 11:25:09 +02:00
|
|
|
{{- $varNameSingular := camelCaseSingular .Table.Name -}}
|
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
|
|
|
}
|