18#ifndef _PREPAREDSTATEMENT_H
19#define _PREPAREDSTATEMENT_H
49 static std::string
ToString(T value);
51 static std::string
ToString(
bool value);
54 static std::string
ToString(std::string
const& value);
55 static std::string
ToString(std::vector<uint8>
const& value);
57 static std::string
ToString(std::nullptr_t);
69 void setNull(
uint8 index);
70 void setBool(
uint8 index,
bool value);
79 void setFloat(
uint8 index,
float value);
80 void setDouble(
uint8 index,
double value);
82 void setString(
uint8 index, std::string
const& value);
83 void setStringView(
uint8 index, std::string_view value);
84 void setBinary(
uint8 index, std::vector<uint8>
const& value);
85 template <
size_t Size>
88 std::vector<uint8> vec(value.begin(), value.end());
89 setBinary(index, vec);
93 std::vector<PreparedStatementData>
const&
GetParameters()
const {
return statement_data; }
125 bool Execute()
override;
std::promise< PreparedQueryResult > PreparedQueryResultPromise
std::future< PreparedQueryResult > PreparedQueryResultFuture
std::chrono::system_clock::time_point SystemTimePoint
PreparedStatementBase(PreparedStatementBase const &right)=delete
PreparedStatementBase & operator=(PreparedStatementBase const &right)=delete
void setBinary(const uint8 index, std::array< uint8, Size > const &value)
std::vector< PreparedStatementData > statement_data
std::vector< PreparedStatementData > const & GetParameters() const
PreparedQueryResultFuture GetFuture()
PreparedQueryResultPromise * m_result
PreparedStatementBase * m_stmt
PreparedStatement(uint32 index, uint8 capacity)
PreparedStatement(PreparedStatement const &right)=delete
PreparedStatement & operator=(PreparedStatement const &right)=delete
std::variant< bool, uint8, uint16, uint32, uint64, int8, int16, int32, int64, float, double, std::string, std::vector< uint8 >, SystemTimePoint, std::nullptr_t > data
static std::string ToString(T value)