@@ -41,44 +41,44 @@ Deserializer::InData::InData(PGresult* dbres, int row, int col, const std::share
4141
4242Deserializer::Deserializer () {
4343
44- m_methods.resize (data::mapping:: type::ClassId::getClassCount (), nullptr );
44+ m_methods.resize (data::type::ClassId::getClassCount (), nullptr );
4545
46- setDeserializerMethod (data::mapping:: type::__class::String::CLASS_ID, &Deserializer::deserializeString);
47- setDeserializerMethod (data::mapping:: type::__class::Any::CLASS_ID, &Deserializer::deserializeAny);
46+ setDeserializerMethod (data::type::__class::String::CLASS_ID, &Deserializer::deserializeString);
47+ setDeserializerMethod (data::type::__class::Any::CLASS_ID, &Deserializer::deserializeAny);
4848
49- setDeserializerMethod (data::mapping:: type::__class::Int8::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int8>);
50- setDeserializerMethod (data::mapping:: type::__class::UInt8::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt8>);
49+ setDeserializerMethod (data::type::__class::Int8::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int8>);
50+ setDeserializerMethod (data::type::__class::UInt8::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt8>);
5151
52- setDeserializerMethod (data::mapping:: type::__class::Int16::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int16>);
53- setDeserializerMethod (data::mapping:: type::__class::UInt16::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt16>);
52+ setDeserializerMethod (data::type::__class::Int16::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int16>);
53+ setDeserializerMethod (data::type::__class::UInt16::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt16>);
5454
55- setDeserializerMethod (data::mapping:: type::__class::Int32::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int32>);
56- setDeserializerMethod (data::mapping:: type::__class::UInt32::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt32>);
55+ setDeserializerMethod (data::type::__class::Int32::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int32>);
56+ setDeserializerMethod (data::type::__class::UInt32::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt32>);
5757
58- setDeserializerMethod (data::mapping:: type::__class::Int64::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int64>);
59- setDeserializerMethod (data::mapping:: type::__class::UInt64::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt64>);
58+ setDeserializerMethod (data::type::__class::Int64::CLASS_ID, &Deserializer::deserializeInt<oatpp::Int64>);
59+ setDeserializerMethod (data::type::__class::UInt64::CLASS_ID, &Deserializer::deserializeInt<oatpp::UInt64>);
6060
61- setDeserializerMethod (data::mapping:: type::__class::Float32::CLASS_ID, &Deserializer::deserializeFloat32);
62- setDeserializerMethod (data::mapping:: type::__class::Float64::CLASS_ID, &Deserializer::deserializeFloat64);
63- setDeserializerMethod (data::mapping:: type::__class::Boolean::CLASS_ID, &Deserializer::deserializeBoolean);
61+ setDeserializerMethod (data::type::__class::Float32::CLASS_ID, &Deserializer::deserializeFloat32);
62+ setDeserializerMethod (data::type::__class::Float64::CLASS_ID, &Deserializer::deserializeFloat64);
63+ setDeserializerMethod (data::type::__class::Boolean::CLASS_ID, &Deserializer::deserializeBoolean);
6464
65- setDeserializerMethod (data::mapping:: type::__class::AbstractObject::CLASS_ID, nullptr );
66- setDeserializerMethod (data::mapping:: type::__class::AbstractEnum::CLASS_ID, &Deserializer::deserializeEnum);
65+ setDeserializerMethod (data::type::__class::AbstractObject::CLASS_ID, nullptr );
66+ setDeserializerMethod (data::type::__class::AbstractEnum::CLASS_ID, &Deserializer::deserializeEnum);
6767
68- setDeserializerMethod (data::mapping:: type::__class::AbstractVector::CLASS_ID, &Deserializer::deserializeArray);
69- setDeserializerMethod (data::mapping:: type::__class::AbstractList::CLASS_ID, &Deserializer::deserializeArray);
70- setDeserializerMethod (data::mapping:: type::__class::AbstractUnorderedSet::CLASS_ID, &Deserializer::deserializeArray);
68+ setDeserializerMethod (data::type::__class::AbstractVector::CLASS_ID, &Deserializer::deserializeArray);
69+ setDeserializerMethod (data::type::__class::AbstractList::CLASS_ID, &Deserializer::deserializeArray);
70+ setDeserializerMethod (data::type::__class::AbstractUnorderedSet::CLASS_ID, &Deserializer::deserializeArray);
7171
72- setDeserializerMethod (data::mapping:: type::__class::AbstractPairList::CLASS_ID, nullptr );
73- setDeserializerMethod (data::mapping:: type::__class::AbstractUnorderedMap::CLASS_ID, nullptr );
72+ setDeserializerMethod (data::type::__class::AbstractPairList::CLASS_ID, nullptr );
73+ setDeserializerMethod (data::type::__class::AbstractUnorderedMap::CLASS_ID, nullptr );
7474
7575 // //
7676
7777 setDeserializerMethod (postgresql::mapping::type::__class::Uuid::CLASS_ID, &Deserializer::deserializeUuid);
7878
7979}
8080
81- void Deserializer::setDeserializerMethod (const data::mapping:: type::ClassId& classId, DeserializerMethod method) {
81+ void Deserializer::setDeserializerMethod (const data::type::ClassId& classId, DeserializerMethod method) {
8282 const v_uint32 id = classId.id ;
8383 if (id >= m_methods.size ()) {
8484 m_methods.resize (id + 1 , nullptr );
@@ -235,21 +235,21 @@ oatpp::Void Deserializer::deserializeBoolean(const Deserializer* _this, const In
235235
236236oatpp::Void Deserializer::deserializeEnum (const Deserializer* _this, const InData& data, const Type* type) {
237237
238- auto polymorphicDispatcher = static_cast <const data::mapping:: type::__class::AbstractEnum::PolymorphicDispatcher*>(
238+ auto polymorphicDispatcher = static_cast <const data::type::__class::AbstractEnum::PolymorphicDispatcher*>(
239239 type->polymorphicDispatcher
240240 );
241241
242- data::mapping:: type::EnumInterpreterError e = data::mapping ::type::EnumInterpreterError::OK;
242+ data::type::EnumInterpreterError e = data::type::EnumInterpreterError::OK;
243243 const auto & value = _this->deserialize (data, polymorphicDispatcher->getInterpretationType ());
244244
245- const auto & result = polymorphicDispatcher->fromInterpretation (value, e);
245+ const auto & result = polymorphicDispatcher->fromInterpretation (value, false , e);
246246
247- if (e == data::mapping:: type::EnumInterpreterError::OK) {
247+ if (e == data::type::EnumInterpreterError::OK) {
248248 return result;
249249 }
250250
251251 switch (e) {
252- case data::mapping:: type::EnumInterpreterError::CONSTRAINT_NOT_NULL:
252+ case data::type::EnumInterpreterError::CONSTRAINT_NOT_NULL:
253253 throw std::runtime_error (" [oatpp::postgresql::mapping::Deserializer::deserializeEnum()]: Error. Enum constraint violated - 'NotNull'." );
254254
255255 default :
@@ -315,7 +315,7 @@ oatpp::Void Deserializer::deserializeAny(const Deserializer* _this, const InData
315315 }
316316
317317 auto value = _this->deserialize (data, valueType);
318- auto anyHandle = std::make_shared<data::mapping:: type::AnyHandle>(value.getPtr (), value.getValueType ());
318+ auto anyHandle = std::make_shared<data::type::AnyHandle>(value.getPtr (), value.getValueType ());
319319
320320 return oatpp::Void (anyHandle, Any::Class::getType ());
321321}
@@ -343,7 +343,7 @@ oatpp::Void Deserializer::deserializeSubArray(const Type* type,
343343 " Error. Unknown collection type." );
344344 }
345345
346- auto dispatcher = static_cast <const data::mapping:: type::__class::Collection::PolymorphicDispatcher*>(type->polymorphicDispatcher );
346+ auto dispatcher = static_cast <const data::type::__class::Collection::PolymorphicDispatcher*>(type->polymorphicDispatcher );
347347 auto itemType = dispatcher->getItemType ();
348348 auto collection = dispatcher->createObject ();
349349
@@ -402,7 +402,7 @@ oatpp::Void Deserializer::deserializeArray(const Deserializer* _this, const InDa
402402
403403 auto ndim = (v_int32) ntohl (*((p_int32)data.data ));
404404 if (ndim == 0 ) {
405- auto dispatcher = static_cast <const data::mapping:: type::__class::Collection::PolymorphicDispatcher*>(type->polymorphicDispatcher );
405+ auto dispatcher = static_cast <const data::type::__class::Collection::PolymorphicDispatcher*>(type->polymorphicDispatcher );
406406 return dispatcher->createObject (); // empty array
407407 }
408408
0 commit comments