diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-06 21:47:02 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-06 21:47:02 +0100 |
commit | 75760ea25c366a47edbd989895b58326da5491d9 (patch) | |
tree | 10e6654c7cf935bf8990231a837ba1024bf8ee0e /project2/sql | |
parent | Tweaks while tracking down Column leak (diff) | |
download | project2-75760ea25c366a47edbd989895b58326da5491d9.tar.bz2 project2-75760ea25c366a47edbd989895b58326da5491d9.tar.xz project2-75760ea25c366a47edbd989895b58326da5491d9.zip |
Move row values stack in ExecContext
Introduce TestAppInstane to provide an AppInstance and ExecContext during UT runs
Diffstat (limited to 'project2/sql')
-rw-r--r-- | project2/sql/sqlCache.cpp | 4 | ||||
-rw-r--r-- | project2/sql/sqlMergeTask.cpp | 3 | ||||
-rw-r--r-- | project2/sql/sqlRows.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/project2/sql/sqlCache.cpp b/project2/sql/sqlCache.cpp index 3fca870..142bf6f 100644 --- a/project2/sql/sqlCache.cpp +++ b/project2/sql/sqlCache.cpp @@ -85,7 +85,7 @@ class SqlCache : public RowSetCache { friend class SqlCacheRowSet; const SqlCacheRowSet * sc; }; - void execute(const Glib::ustring&, const RowProcessorCallback & rp, ExecContext *) const { + void execute(const Glib::ustring&, const RowProcessorCallback & rp, ExecContext * ec) const { SqlCacheRowState ss(this); HandleAsVariableType h; do { @@ -115,7 +115,7 @@ class SqlCache : public RowSetCache { col.apply(h); ss.fields[&c - &colCols.front()] = h.variable; } - ss.process(rp); + ss.process(ec, rp); } } while (s->fetch()); } diff --git a/project2/sql/sqlMergeTask.cpp b/project2/sql/sqlMergeTask.cpp index d0f6499..df4b0c0 100644 --- a/project2/sql/sqlMergeTask.cpp +++ b/project2/sql/sqlMergeTask.cpp @@ -7,6 +7,7 @@ #include "sqlVariableBinder.h" #include "scriptLoader.h" #include "scopeObject.h" +#include "execContext.h" #include <misc.h> #include <stdio.h> #include <stdexcept> @@ -277,7 +278,7 @@ class Populate : public NoOutputExecute { void execute(ExecContext * ec) const { unsigned int idx = 0; - RowState::Stack().back()->foreachColumn(ec, boost::bind(&Populate::bind, this, boost::ref(idx), _3)); + ec->RowValues(0)->foreachColumn(ec, boost::bind(&Populate::bind, this, boost::ref(idx), _3)); cmd->execute(); } private: diff --git a/project2/sql/sqlRows.cpp b/project2/sql/sqlRows.cpp index 59aa0e8..f8a16e1 100644 --- a/project2/sql/sqlRows.cpp +++ b/project2/sql/sqlRows.cpp @@ -61,7 +61,7 @@ SqlRows::execute(const Glib::ustring & filter, const RowProcessorCallback & rp, col.apply(h); ss.fields[c] = h.variable; } - ss.process(rp); + ss.process(ec, rp); } } |