sqlboiler/templates/singleton/00_helpers.tpl
2016-08-01 15:10:10 +10:00

16 lines
467 B
Smarty

// M type is for providing where filters to Where helpers.
type M map[string]interface{}
// NewQueryG initializes a new Query using the passed in QueryMods
func NewQueryG(mods ...qm.QueryMod) *boil.Query {
return NewQuery(boil.GetDB(), mods...)
}
// NewQuery initializes a new Query using the passed in QueryMods
func NewQuery(exec boil.Executor, mods ...qm.QueryMod) *boil.Query {
q := &boil.Query{}
boil.SetExecutor(q, exec)
qm.Apply(q, mods...)
return q
}