allow nulls in string field

This commit is contained in:
Павел Литвиненко 2018-02-04 17:00:43 +03:00
parent 3c607171d2
commit 4ebde2ac7e

View File

@ -105,6 +105,11 @@ namespace
static_cast<ColumnString &>(column).insertDataWithTerminatingZero(string_id.data(), string_id.size() + 1); static_cast<ColumnString &>(column).insertDataWithTerminatingZero(string_id.data(), string_id.size() + 1);
break; break;
} }
else if (value.type() == Poco::MongoDB::ElementTraits<Poco::MongoDB::NullValue>::TypeId)
{
static_cast<ColumnVector<String> &>(column).getData().emplace_back();
break;
}
else if (value.type() == Poco::MongoDB::ElementTraits<String>::TypeId) else if (value.type() == Poco::MongoDB::ElementTraits<String>::TypeId)
{ {
String string = static_cast<const Poco::MongoDB::ConcreteElement<String> &>(value).value(); String string = static_cast<const Poco::MongoDB::ConcreteElement<String> &>(value).value();