#ifndef QUERY_STATEMENT_IMPL_HPP #define QUERY_STATEMENT_IMPL_HPP #include "matador/sql/query_context.hpp" #include "matador/sql/query_result_impl.hpp" #include "matador/sql/parameter_binder.hpp" #include namespace matador::sql { class statement_impl { protected: explicit statement_impl(query_context query); public: virtual ~statement_impl() = default; virtual size_t execute() = 0; virtual std::unique_ptr fetch() = 0; template < class V > void bind(size_t pos, V &val) { binder().bind(pos, val); } void bind(size_t pos, std::string &val, size_t size) { binder().bind(pos, val, size); } virtual void reset() = 0; protected: virtual parameter_binder& binder() = 0; protected: friend class statement; query_context query_; }; } #endif //QUERY_STATEMENT_IMPL_HPP