2016-04-19 04:02:32 +02:00
|
|
|
// 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
|
2016-06-14 16:01:28 +02:00
|
|
|
func NewQuery(mods ...qm.QueryMod) *boil.Query {
|
2016-04-19 04:02:32 +02:00
|
|
|
return NewQueryX(boil.GetDB(), mods...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQueryX initializes a new Query using the passed in QueryMods
|
2016-06-14 16:01:28 +02:00
|
|
|
func NewQueryX(exec boil.Executor, mods ...qm.QueryMod) *boil.Query {
|
2016-04-23 13:54:24 +02:00
|
|
|
q := &boil.Query{}
|
|
|
|
boil.SetExecutor(q, exec)
|
2016-06-14 16:01:28 +02:00
|
|
|
qm.Apply(q, mods...)
|
2016-04-19 04:02:32 +02:00
|
|
|
|
|
|
|
return q
|
|
|
|
}
|