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 -}}
|
|
|
|
type {{$varNameSingular}}Query struct {
|
|
|
|
*boil.Query
|
|
|
|
}
|
|
|
|
|
2016-03-18 12:26:48 +01:00
|
|
|
// {{$tableNamePlural}}All retrieves all records.
|
2016-04-23 13:54:24 +02:00
|
|
|
func {{$tableNamePlural}}(mods ...qs.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-04-23 13:54:24 +02:00
|
|
|
func {{$tableNamePlural}}X(exec boil.Executor, mods ...qs.QueryMod) {{$varNameSingular}}Query {
|
|
|
|
mods = append(mods, qs.From("{{.Table.Name}}"))
|
|
|
|
return {{$varNameSingular}}Query{NewQueryX(exec, mods...)}
|
2016-04-17 11:25:09 +02:00
|
|
|
}
|