25 #ifndef __GNC_DBISQLBACKEND_HPP__ 26 #define __GNC_DBISQLBACKEND_HPP__ 32 #include <gnc-sql-result.hpp> 43 m_conn{conn}, m_dbi_result{result}, m_iter{
this}, m_row{&m_iter},
44 m_sentinel{
nullptr} {}
46 uint64_t size()
const noexcept;
47 int dberror()
const noexcept;
57 virtual GncSqlRow& operator++(
int) {
return ++(*this); };
59 virtual std::optional<int64_t> get_int_at_col (
const char* col)
const;
60 virtual std::optional<double> get_float_at_col (
const char* col)
const;
61 virtual std::optional<double> get_double_at_col (
const char* col)
const;
62 virtual std::optional<std::string> get_string_at_col (
const char* col)
const;
63 virtual std::optional<time64> get_time64_at_col (
const char* col)
const;
64 virtual bool is_col_null(
const char* col)
const noexcept
66 return dbi_result_field_is_null(m_inst->m_dbi_result, col);
74 dbi_result m_dbi_result;
81 #endif //__GNC_DBISQLRESULT_HPP__
load and save data to SQL via libdbi
Row of SQL Query results.
Encapsulate a libdbi dbi_conn connection.
An iterable wrapper for dbi_result; allows using C++11 range for.
Pure virtual class to iterate over a query result set.