added blob interface to backend binder classes
This commit is contained in:
parent
9509e56f3e
commit
9c8e402692
|
|
@ -54,6 +54,8 @@ public:
|
|||
void bind(size_t pos, const std::string &string) override;
|
||||
void bind(size_t pos, const std::string &x, size_t size) override;
|
||||
|
||||
void bind(size_t pos, const utils::blob &blob) override;
|
||||
|
||||
[[nodiscard]] std::vector<MYSQL_BIND>& bind_params();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -179,6 +179,11 @@ void mysql_parameter_binder::bind(size_t pos, const std::string &str, size_t siz
|
|||
detail::bind_value(MYSQL_TYPE_VAR_STRING, str.data(), size, bind_params_[pos], is_null_vector[pos].is_null);
|
||||
}
|
||||
|
||||
void mysql_parameter_binder::bind(size_t pos, const utils::blob &blob)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::vector<MYSQL_BIND> &mysql_parameter_binder::bind_params()
|
||||
{
|
||||
return bind_params_;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ public:
|
|||
void bind(size_t pos, const std::string &string) override;
|
||||
void bind(size_t pos, const std::string &x, size_t size) override;
|
||||
|
||||
void bind(size_t pos, const utils::blob &blob) override;
|
||||
|
||||
const std::vector<const char*>& params() const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -2,13 +2,17 @@
|
|||
|
||||
#include "matador/sql/dialect_builder.hpp"
|
||||
|
||||
[[maybe_unused]] const matador::sql::dialect* get_dialect() {
|
||||
[[maybe_unused]] const matador::sql::dialect *get_dialect()
|
||||
{
|
||||
using namespace matador::sql;
|
||||
const static dialect d = dialect_builder::builder()
|
||||
.create()
|
||||
.with_placeholder_func([](size_t index) {
|
||||
return "$" + std::to_string(index);
|
||||
})
|
||||
.with_data_type_replace_map({
|
||||
{data_type_t::type_blob, "BYTEA"}
|
||||
})
|
||||
.with_default_schema_name("public")
|
||||
.build();
|
||||
return &d;
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ void postgres_parameter_binder::bind(size_t pos, const std::string &str, size_t
|
|||
bind(pos, str);
|
||||
}
|
||||
|
||||
void postgres_parameter_binder::bind(size_t pos, const utils::blob &blob)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const std::vector<const char *> &postgres_parameter_binder::params() const
|
||||
{
|
||||
return params_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue