From b5f8a16ef60238c4bbcc4bf64c37a181b3bea270 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 29 Dec 2015 04:28:57 +0000 Subject: Non-const command getters --- libdbpp/connection.h | 4 ++-- libdbpp/unittests/testConnection.cpp | 4 ++-- 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 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 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 executed; mutable unsigned int txDepth; -- cgit v1.2.3