#ifndef MYGRATE_INPUT_MYSQLRECORDSET_H #define MYGRATE_INPUT_MYSQLRECORDSET_H #include "mysqlStmt.h" #include #include #include #include #include #include namespace MyGrate::Input { class ResultData; class MySQLData { public: using ResultDataPtr = std::unique_ptr; using ResPtr = std::unique_ptr; explicit MySQLData(StmtPtr s); std::size_t columns() const; DbValue at(std::size_t col) const; StmtPtr stmt; std::vector fields; std::vector extras; }; class MySQLRecordSet : public MySQLData, public RecordSet { public: using StmtResPtr = std::unique_ptr; explicit MySQLRecordSet(StmtPtr s); std::size_t rows() const override; std::size_t columns() const override; DbValue at(std::size_t row, std::size_t col) const override; private: StmtResPtr stmtres; mutable std::size_t currentRow {static_cast(-1)}; }; } #endif