sqlboiler/templates/singleton/boil_queries.tpl

14 lines
377 B
Smarty
Raw Normal View History

2016-08-01 07:10:10 +02:00
// NewQueryG initializes a new Query using the passed in QueryMods
func NewQueryG(mods ...qm.QueryMod) *boil.Query {
return NewQuery(boil.GetDB(), mods...)
}
2016-08-01 07:10:10 +02:00
// 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
}