sqlboiler/cmds/templates/singles/helpers.tpl
Patrick O'brien 2abe35e6f9 Moved Apply back to query mods
* Added tests for query file
2016-04-20 22:51:04 +10:00

16 lines
463 B
Smarty

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