mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
More defensive string construction in result set.
This commit is contained in:
parent
f88efada67
commit
9145a3a4ee
@ -46,7 +46,10 @@ namespace sqlpp
|
||||
const char* text{nullptr};
|
||||
size_t len{};
|
||||
target._bind_text_result(index, &text, &len);
|
||||
if (text)
|
||||
this->_value = {text, len};
|
||||
else
|
||||
this->value = {};
|
||||
this->_is_null = (text == nullptr);
|
||||
}
|
||||
|
||||
@ -56,7 +59,10 @@ namespace sqlpp
|
||||
const char* text{nullptr};
|
||||
size_t len{};
|
||||
target._post_bind_text_result(index, &text, &len);
|
||||
if (text)
|
||||
this->_value = {text, len};
|
||||
else
|
||||
this->value = {};
|
||||
this->_is_null = (text == nullptr);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user