diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-04-28 21:02:14 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-04-28 21:02:14 +0100 |
commit | 8af06d99317d2fdc499eef86d9d5e9c157a052c2 (patch) | |
tree | abae878df2134e562b76ce8ab40860140e70e9f4 /project2/sql/rdbmsDataSource.cpp | |
parent | Pass include dirs to slice tools (diff) | |
download | project2-8af06d99317d2fdc499eef86d9d5e9c157a052c2.tar.bz2 project2-8af06d99317d2fdc499eef86d9d5e9c157a052c2.tar.xz project2-8af06d99317d2fdc499eef86d9d5e9c157a052c2.zip |
Move the mocked PQ db into the PQ module and start the basis of the SQL mod unit tests
Diffstat (limited to 'project2/sql/rdbmsDataSource.cpp')
-rw-r--r-- | project2/sql/rdbmsDataSource.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/project2/sql/rdbmsDataSource.cpp b/project2/sql/rdbmsDataSource.cpp index b25e8dc..5f0d43a 100644 --- a/project2/sql/rdbmsDataSource.cpp +++ b/project2/sql/rdbmsDataSource.cpp @@ -116,14 +116,20 @@ RdbmsDataSource::getReadonly() const } void +RdbmsDataSource::close() +{ + LOCK(ilock); + LOCK(glock); + RdbmsDataSource::dbhosts.clear(); +} + +void RdbmsDataSource::commit() { LOCK(ilock); LOCK(glock); auto masters = dbhosts.equal_range(masterDsn); for (auto m = masters.first; m != masters.second; m++) { - if (m->second->threadId) { - } if (m->second->txOpen && m->second->threadId && *m->second->threadId == std::this_thread::get_id()) { m->second->connection->commitTx(); m->second->txOpen = false; |