fixed backend tests (progress)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "matador/query/attribute_string_writer.hpp"
|
||||
|
||||
// #include "matador/sql/connection_impl.hpp"
|
||||
#include "matador/sql/interface/connection_impl.hpp"
|
||||
#include <matador/utils/convert.hpp>
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@ void attribute_string_writer::write_value(size_t /*pos*/, const bool& x ) {
|
||||
}
|
||||
|
||||
void attribute_string_writer::write_value(size_t /*pos*/, const float& x ) {
|
||||
if (const auto res = utils::to<std::string>(x); res.is_error()) {
|
||||
if (const auto res = utils::to<std::string>(x); !res.is_error()) {
|
||||
result_ = *res;
|
||||
}
|
||||
}
|
||||
|
||||
void attribute_string_writer::write_value(size_t /*pos*/, const double& x ) {
|
||||
if (const auto res = utils::to<std::string>(x); res.is_error()) {
|
||||
if (const auto res = utils::to<std::string>(x); !res.is_error()) {
|
||||
result_ = *res;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ void attribute_string_writer::write_value(size_t /*pos*/, const utils::blob& x )
|
||||
// MSSQL: 0x5468697320697320612062616E617279204461746120737472696E67
|
||||
// Sqlite: X'5468697320697320612062616E617279204461746120737472696E67'
|
||||
if (conn_.has_value()) {
|
||||
// result_ = dialect_.token_at(sql::dialect_token::BEGIN_BINARY_DATA) + conn_.value().get().to_escaped_string(x) + dialect_.token_at(sql::dialect_token::END_BINARY_DATA);
|
||||
result_ = dialect_.token_at(sql::dialect_token::BEGIN_BINARY_DATA) + conn_.value().get().to_escaped_string(x) + dialect_.token_at(sql::dialect_token::END_BINARY_DATA);
|
||||
} else {
|
||||
result_ = dialect_.token_at(sql::dialect_token::BEGIN_BINARY_DATA) + dialect_.to_escaped_string(x) + dialect_.token_at(sql::dialect_token::END_BINARY_DATA);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user