From fbcbfd9e968252e6ba9cf43155a38d0c34379ef1 Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 18 Dec 2020 10:53:12 +1000 Subject: [PATCH] add ComplexPrepare to AccSelectBuilder --- query_gen/acc_builders.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/query_gen/acc_builders.go b/query_gen/acc_builders.go index ec5aa81a..992d705e 100644 --- a/query_gen/acc_builders.go +++ b/query_gen/acc_builders.go @@ -219,6 +219,11 @@ func (b *AccSelectBuilder) Prepare() *sql.Stmt { return b.build.SimpleSelect(b.table, b.columns, b.where, b.orderby, b.limit) } +func (b *AccSelectBuilder) ComplexPrepare() *sql.Stmt { + selectBuilder := b.build.GetAdapter().Builder().Select().FromAcc(b) + return b.build.prepare(b.build.GetAdapter().ComplexSelect(selectBuilder)) +} + func (b *AccSelectBuilder) query() (string, error) { // TODO: Phase out the procedural API and use the adapter's OO API? The OO API might need a bit more work before we do that and it needs to be rolled out to MSSQL. if b.dateCutoff != nil || b.inChain != nil {