query/source/orm/sql/interface/statement_proxy.cpp

26 lines
788 B
C++

#include "matador/sql/interface/statement_proxy.hpp"
namespace matador::sql {
statement_proxy::statement_proxy(std::unique_ptr<statement_impl>&& stmt)
: statement_(std::move(stmt)){}
void statement_proxy::bind(const size_t pos, const char* value, const size_t size, parameter_binder& bindings) const {
statement_->bind(pos, value, size, bindings);
}
void statement_proxy::bind(const size_t pos, std::string& val, const size_t size, parameter_binder& bindings) const {
statement_->bind(pos, val, size, bindings);
}
void statement_proxy::reset() const {
statement_->reset();
}
std::string statement_proxy::sql() const {
return statement_->query_.sql;
}
std::unique_ptr<utils::attribute_writer> statement_proxy::create_binder() const {
return statement_->create_binder();
}
}