11 #ifndef _MARIADB_STATEMENT_HPP_ 12 #define _MARIADB_STATEMENT_HPP_ 17 #define MAKE_SETTER_SIG(nm, type, fq) void fq set_##nm(u32 index, type value) 19 #define MAKE_SETTER_DECL(nm, type) MAKE_SETTER_SIG(nm, type, ) 21 #define MAKE_SETTER_BODY \ 22 if (index >= m_data->m_bind_count) throw std::out_of_range("Field index out of range"); \ 24 bind& bind = *m_data->m_binds.at(index); 26 #define MAKE_SETTER(nm, type) \ 27 MAKE_SETTER_SIG(nm, type, statement::) { \
std::shared_ptr< result_set > result_set_ref
Class representing SQL time.
result_set_ref query()
Execute the query and return a result set.
u64 insert()
Execute the query and return the last insert id.
std::shared_ptr< std::istream > stream_ref
u64 execute()
Execute the query and return the number of rows affected.
std::shared_ptr< ::mariadb::data< char > > data_ref
Class representing a prepared statement with binding functionality.
connection_ref m_connection
Class used to represent SQL date_time.
Wraps a Database connection.
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.
MAKE_SETTER_DECL(blob, stream_ref)
statement_data_ref m_data
std::shared_ptr< statement_data > statement_data_ref
std::shared_ptr< connection > connection_ref
void set_connection(connection_ref &connection)
Set connection ref, used by concurrency.
Class used to store query and statement results.
std::shared_ptr< statement > statement_ref