120 template <typename... Args>
124 (void)((Bind(idx++, std::forward<Args>(args))), ...);
134 inline std::string_view
Name() const noexcept {
142 inline std::string_view
Query() const noexcept {
156 m_telemetry->RecordEvent(event);
165 template <
typename T>
167 Binder(index,
Value(std::forward<T>(value)));
175 Binder(index,
Value());
191 virtual void Reset() noexcept = 0;
Abstract prepared statement.
Definition prepared_stmt.hxx:69
PreparedSTMT(std::string_view name, std::string_view query, const StormByte::Shared< Logger::Log > &logger, const StormByte::Shared< Telemetry > &telemetry)
Copy statement metadata and share connection telemetry.
std::string_view Name() const noexcept
Statement name.
Definition prepared_stmt.hxx:134
PreparedSTMT(PreparedSTMT &&other) noexcept
Move constructor.
virtual ~PreparedSTMT() noexcept
Destructor.
PreparedSTMT(std::string_view name, std::string_view query, const StormByte::Shared< Logger::Log > &logger)
Copy name, query and logger.
void RecordBackendEvent(BackendEvent event) noexcept
Record a backend event against the owning connection.
Definition prepared_stmt.hxx:154
StormByte::Shared< Logger::Log > m_logger
Shared logger, safe across the DLL boundary.
Definition prepared_stmt.hxx:147
StormByte::Shared< Telemetry > m_telemetry
Shared connection telemetry.
Definition prepared_stmt.hxx:148
std::string_view Query() const noexcept
SQL text.
Definition prepared_stmt.hxx:142
void Bind(StormByte::Size index, T &&value) noexcept
Bind a value at index.
Definition prepared_stmt.hxx:166
void Bind(StormByte::Size index, std::nullptr_t) noexcept
Bind SQL NULL at index.
Definition prepared_stmt.hxx:174
PreparedSTMT(const PreparedSTMT &other)=delete
Copy constructor (deleted).
Type-erased SQL value (NULL, integers, double, text, blob, bool).
Definition value.hxx:68
BackendEvent
Shared error and warning categories for backend-specific telemetry.
Definition telemetry.hxx:54
Expected< Rows, QueryException > ExpectedRows
Query result: Rows or QueryException.
Definition typedefs.hxx:82
Root namespace of the StormByte C++ suite.
#define STORMBYTE_DATABASE_PUBLIC
Definition visibility.h:54