renamed blob to blob_type_t

This commit is contained in:
2026-01-07 09:21:10 +01:00
parent 41f6c9f516
commit f30c250a20
44 changed files with 88 additions and 80 deletions
+2 -2
View File
@@ -123,11 +123,11 @@ void data_type_traits<std::string>::bind_value(attribute_writer &binder, const s
binder.write_value(index, value, size);
}
void data_type_traits<blob>::read_value(attribute_reader &reader, const char *id, const size_t index, utils::blob &value, const size_t /*size*/) {
void data_type_traits<blob_type_t>::read_value(attribute_reader &reader, const char *id, const size_t index, utils::blob_type_t &value, const size_t /*size*/) {
reader.read_value(id, index, value);
}
void data_type_traits<blob>::bind_value(attribute_writer &binder, const size_t index, blob &value, const size_t /*size*/) {
void data_type_traits<blob_type_t>::bind_value(attribute_writer &binder, const size_t index, blob_type_t &value, const size_t /*size*/) {
binder.write_value(index, value);
}
+1 -1
View File
@@ -4,7 +4,7 @@
#include <sstream>
namespace matador::utils {
std::string to_string(const blob& data) {
std::string to_string(const blob_type_t& data) {
static constexpr char HEXITS[] = "0123456789ABCDEF";
std::string str(2 * data.size(), '\0');
+1 -1
View File
@@ -99,7 +99,7 @@ void initialize_by_basic_type(const basic_type type, database_type &val) {
val.emplace<timestamp>();
break;
case basic_type::Blob:
val.emplace<blob>();
val.emplace<blob_type_t>();
break;
default:
val.emplace<nullptr_t>();
+1 -1
View File
@@ -12,7 +12,7 @@ size_t determine_size(const char *val) {
return strlen(val);
}
size_t determine_size(const blob &val) {
size_t determine_size(const blob_type_t &val) {
return val.size();
}
}
+1 -1
View File
@@ -96,7 +96,7 @@ void attribute_string_writer::write_value(size_t /*pos*/, const std::string &x,
result_ = "'" + dialect_.prepare_literal(x) + "'";
}
void attribute_string_writer::write_value(size_t /*pos*/, const utils::blob &x) {
void attribute_string_writer::write_value(size_t /*pos*/, const utils::blob_type_t &x) {
// "This is a binary Data string" as binary data:
// MySQL: X'5468697320697320612062616E617279204461746120737472696E67'
// Postgres: '\\x5468697320697320612062616E617279204461746120737472696E67'
+1 -1
View File
@@ -89,7 +89,7 @@ void value_extractor::write_value(size_t /*pos*/, const std::string &x, size_t /
values_.emplace_back(x);
}
void value_extractor::write_value(size_t /*pos*/, const utils::blob &x) {
void value_extractor::write_value(size_t /*pos*/, const utils::blob_type_t &x) {
values_.emplace_back(x);
}
+1 -1
View File
@@ -97,7 +97,7 @@ std::string dialect::next_placeholder(const std::vector<std::string> &bind_vars)
return placeholder_func_(bind_vars.size());
}
std::string dialect::to_escaped_string(const utils::blob &value, const connection_impl *conn) const {
std::string dialect::to_escaped_string(const utils::blob_type_t &value, const connection_impl *conn) const {
if (conn != nullptr) {
return conn->to_escaped_string(value);
}