summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 04:28:57 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 06:00:07 +0000
commitb5f8a16ef60238c4bbcc4bf64c37a181b3bea270 (patch)
tree683dd55a0d8fcdd25f17cd4dc0760941c336fb8c
parentDefault (not supported) bulk upload implementation (diff)
downloadlibdbpp-b5f8a16ef60238c4bbcc4bf64c37a181b3bea270.tar.bz2
libdbpp-b5f8a16ef60238c4bbcc4bf64c37a181b3bea270.tar.xz
libdbpp-b5f8a16ef60238c4bbcc4bf64c37a181b3bea270.zip
Non-const command getters
-rw-r--r--libdbpp/connection.h4
-rw-r--r--libdbpp/unittests/testConnection.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/libdbpp/connection.h b/libdbpp/connection.h
index 9690164..2ef53ac 100644
--- a/libdbpp/connection.h
+++ b/libdbpp/connection.h
@@ -116,11 +116,11 @@ namespace DB {
/// @param s the location of the script.
virtual void executeScript(std::istream & f, const boost::filesystem::path & s);
/// Create a new select command with the given SQL.
- virtual SelectCommand * newSelectCommand(const std::string & sql) const = 0;
+ virtual SelectCommand * newSelectCommand(const std::string & sql) = 0;
/// Create a new select command with the given SQL [smart pointer].
virtual boost::shared_ptr<SelectCommand> select(const std::string & sql);
/// Create a new modify command with the given SQL.
- virtual ModifyCommand * newModifyCommand(const std::string & sql) const = 0;
+ virtual ModifyCommand * newModifyCommand(const std::string & sql) = 0;
/// Create a new modify command with the given SQL [smart pointer].
virtual boost::shared_ptr<ModifyCommand> modify(const std::string & sql);
diff --git a/libdbpp/unittests/testConnection.cpp b/libdbpp/unittests/testConnection.cpp
index c42ddca..c87121a 100644
--- a/libdbpp/unittests/testConnection.cpp
+++ b/libdbpp/unittests/testConnection.cpp
@@ -26,8 +26,8 @@ class MockDb : public DB::Connection {
void execute(const std::string & sql) override {
executed.push_back(sql);
}
- DB::SelectCommand * newSelectCommand(const std::string &) const { return nullptr; }
- DB::ModifyCommand * newModifyCommand(const std::string &) const { return nullptr; }
+ DB::SelectCommand * newSelectCommand(const std::string &) override { return nullptr; }
+ DB::ModifyCommand * newModifyCommand(const std::string &) override { return nullptr; }
mutable std::vector<std::string> executed;
mutable unsigned int txDepth;