Gen code for query #78

Merged
eelke merged 11 commits from gen-code-for-query into master 2018-09-23 08:38:07 +00:00
Showing only changes of commit 0ba632afd1 - Show all commits

View file

@ -48,7 +48,7 @@ namespace Pgsql {
{ {
if (m_val == nullptr) { if (m_val == nullptr) {
if (nullhandling == NullHandling::Throw) if (nullhandling == NullHandling::Throw)
throw std::runtime_error("Unexpected NULL value in array"); throw std::runtime_error("Unexpected NULL value for array");
} }
else { else {
using value_type = E; using value_type = E;
@ -77,6 +77,8 @@ namespace Pgsql {
template <typename E, typename I> template <typename E, typename I>
void getAsArray(I insert_iter, const E &value_for_nulls) const void getAsArray(I insert_iter, const E &value_for_nulls) const
{ {
if (m_val == nullptr) return;
using value_type = E; using value_type = E;
ArrayParser parser(m_val); ArrayParser parser(m_val);
for (;;) { for (;;) {