#ifndef QUERY_POSTGRES_STATEMENT_HPP #define QUERY_POSTGRES_STATEMENT_HPP #include "matador/sql/interface/statement_impl.hpp" #include "matador/sql/interface/parameter_binder.hpp" #include namespace matador::backends::postgres { class postgres_statement final : public sql::statement_impl { public: postgres_statement(PGconn *db, PGresult *res, std::string name, const sql::query_context &query); ~postgres_statement() override; utils::result execute(const sql::parameter_binder& bindings) override; utils::result, utils::error> fetch(const sql::parameter_binder& bindings) override; protected: [[nodiscard]] std::unique_ptr create_binder() const override; private: PGconn *db_{nullptr}; PGresult *res_ = nullptr; std::string name_; }; } #endif //QUERY_POSTGRES_STATEMENT_HPP