11 #ifndef _MARIADB_RESULT_SET_HPP_ 12 #define _MARIADB_RESULT_SET_HPP_ 22 #define MAKE_GETTER_SIG_STR(nm, rtype, fq) rtype fq get_##nm(const std::string& name) const 23 #define MAKE_GETTER_SIG_INT(nm, rtype, fq) rtype fq get_##nm(u32 index) const 25 #define MAKE_GETTER_DECL(nm, rtype) \ 26 MAKE_GETTER_SIG_STR(nm, rtype, ); \ 27 MAKE_GETTER_SIG_INT(nm, rtype, ) 29 #define MAKE_GETTER(nm, rtype, vtype) \ 30 MAKE_GETTER_SIG_STR(nm, rtype, result_set::) { return get_##nm(column_index(name)); } \ 31 MAKE_GETTER_SIG_INT(nm, rtype, result_set::) { \ 32 check_row_fetched(); \ 33 check_type(index, vtype); \ 35 if (index >= m_field_count) throw std::out_of_range("Column index out of range"); 86 u32 column_count()
const;
118 unsigned long column_size(
u32 index)
const;
125 u64 row_index()
const;
132 u64 row_count()
const;
185 void check_row_fetched()
const;
std::shared_ptr< result_set > result_set_ref
Class representing SQL time.
unsigned long m_bind_count
std::shared_ptr< std::istream > stream_ref
std::vector< bind_ref > m_binds
std::map< std::string, u32 > map_indexes_t
#define MAKE_GETTER_DECL(nm, rtype)
std::shared_ptr< ::mariadb::data< char > > data_ref
Class representing a prepared statement with binding functionality.
std::vector< bind_ref > m_binds
Class used to represent SQL date_time.
Wraps a Database connection.
statement_data(MYSQL_STMT *stmt)
static void statement(LexState *ls)
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
long unsigned int * m_lengths
std::shared_ptr< statement_data > statement_data_ref
statement_data_ref m_stmt_data
Class used to store query and statement results.