initial matador ng commit

This commit is contained in:
2025-02-02 20:37:12 +01:00
parent 19de5714f4
commit ded3daceb3
378 changed files with 14913 additions and 13431 deletions
@@ -0,0 +1,35 @@
#ifndef QUERY_QUERY_RESULT_READER_HPP
#define QUERY_QUERY_RESULT_READER_HPP
#include "matador/sql/internal/object_result_binder.hpp"
#include "matador/utils/attribute_reader.hpp"
#include "matador/utils/error.hpp"
#include "matador/utils/result.hpp"
namespace matador::sql {
class query_result_reader : public utils::attribute_reader
{
public:
[[nodiscard]] virtual size_t column_count() const = 0;
[[nodiscard]] virtual const char* column(size_t index) const = 0;
[[nodiscard]] virtual utils::result<bool, utils::error> fetch() = 0;
[[nodiscard]] virtual size_t start_column_index() const = 0;
template<class Type>
void bind(Type &obj) {
object_binder_.reset();
object_binder_.bind(obj, result_binder());
}
protected:
virtual attribute_reader& result_binder() = 0;
private:
// detail::empty_binder empty_result_binder_;
object_result_binder object_binder_;
};
}
#endif //QUERY_QUERY_RESULT_READER_HPP