has many fetch with join
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
||||
[[nodiscard]] const char *column(size_t index) const override;
|
||||
utils::result<bool, utils::error> fetch() override;
|
||||
[[nodiscard]] size_t start_column_index() const override;
|
||||
void unshift() override;
|
||||
|
||||
void read_value(const char *id, size_t index, int8_t &value) override;
|
||||
void read_value(const char *id, size_t index, int16_t &value) override;
|
||||
|
||||
@@ -34,6 +34,12 @@ size_t postgres_result_reader::start_column_index() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void postgres_result_reader::unshift() {
|
||||
if (row_index_ > 0) {
|
||||
--row_index_;
|
||||
}
|
||||
}
|
||||
|
||||
void postgres_result_reader::read_value(const char * /*id*/, const size_t index, int8_t &value) {
|
||||
if (auto res = utils::to<int8_t>(column(index)); res.is_ok()) {
|
||||
value = res.value();
|
||||
|
||||
Reference in New Issue
Block a user