When a Nullable<String> value is bound using dynamic result binding, it's not initialized correctly. I have table with nullable string column, which is filled by a data. Calling Nullable::isValid() returns false, but using operator*() I get correct data from db. The problem might be missing initialization of "engaged" value.
Here's failing testcase for this issue from @tnozicka :
diff --git a/tests/db_access/dynamic_prepared_statements.cpp b/tests/db_access/dynamic_prepared_statements.cpp
index e32750b..612761f 100644
--- a/tests/db_access/dynamic_prepared_statements.cpp
+++ b/tests/db_access/dynamic_prepared_statements.cpp
@@ -148,6 +148,7 @@ go_bandit([](){
int count = 0;
while (preparedStatement.fetch())
{
+ AssertThat(sname.isValid(), IsTrue());
auto name = sname->getString();
AssertThat(id, Equals(12));
When a
Nullable<String>
value is bound using dynamic result binding, it's not initialized correctly. I have table with nullable string column, which is filled by a data. Calling Nullable::isValid() returns false, but using operator*() I get correct data from db. The problem might be missing initialization of "engaged" value.Here's failing testcase for this issue from @tnozicka :