sqlboiler/templates/singleton/boil_queries.tpl

22 lines
622 B
Smarty
Raw Normal View History

2016-09-15 05:59:55 +02:00
var dialect = queries.Dialect{
LQ: 0x{{printf "%x" .Dialect.LQ}},
RQ: 0x{{printf "%x" .Dialect.RQ}},
IndexPlaceholders: {{.Dialect.IndexPlaceholders}},
UseTopClause: {{.Dialect.UseTopClause}},
2016-09-09 19:14:18 +02:00
}
2016-08-01 07:10:10 +02:00
// NewQueryG initializes a new Query using the passed in QueryMods
2016-09-15 05:59:55 +02:00
func NewQueryG(mods ...qm.QueryMod) *queries.Query {
return NewQuery(boil.GetDB(), mods...)
}
2016-08-01 07:10:10 +02:00
// NewQuery initializes a new Query using the passed in QueryMods
2016-09-15 05:59:55 +02:00
func NewQuery(exec boil.Executor, mods ...qm.QueryMod) *queries.Query {
q := &queries.Query{}
queries.SetExecutor(q, exec)
queries.SetDialect(q, &dialect)
qm.Apply(q, mods...)
return q
}