Add workaround for empty strings being null in Oracle

Oracle historically treats empty VARCHAR[2] column values as nulls, so
we need to adjust the string length unit test to provide indicators when
retrieving the value of a possibly null string and use nvl() to compute
its length to make this test pass when using this backend.
This commit is contained in:
Vadim Zeitlin
2017-09-14 14:58:07 +02:00
parent 2d74f9aaa0
commit 63bcc89440
11 changed files with 35 additions and 32 deletions

View File

@@ -1173,9 +1173,9 @@ public:
return false;
}
virtual std::string get_length_function_name() const
virtual std::string sql_length(std::string const& s) const
{
return "char_length";
return "char_length(" + s + ")";
}
};