comparison Framework/Common/DatabaseManager.cpp @ 434:23c7af6f671a pg-transactions

DeleteResource does not need the RemainingAncestor table anymore
author Alain Mazy <am@osimis.io>
date Wed, 13 Dec 2023 16:52:06 +0100
parents 3d6886f3e5b3
children 326f8304daa1
comparison
equal deleted inserted replaced
433:5964ce6385a5 434:23c7af6f671a
490 { 490 {
491 case ValueType_Integer64: 491 case ValueType_Integer64:
492 return dynamic_cast<const Integer64Value&>(value).GetValue(); 492 return dynamic_cast<const Integer64Value&>(value).GetValue();
493 493
494 default: 494 default:
495 //LOG(ERROR) << value.Format(); 495 // LOG(ERROR) << value.GetType();
496 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 496 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
497 } 497 }
498 } 498 }
499 } 499 }
500 500
519 return static_cast<int32_t>(value); 519 return static_cast<int32_t>(value);
520 } 520 }
521 } 521 }
522 } 522 }
523 523
524 524 bool DatabaseManager::StatementBase::IsNull(size_t field) const
525 {
526 if (IsDone())
527 {
528 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
529 }
530 else
531 {
532 return GetResultField(field).GetType() == ValueType_Null;
533 }
534 }
535
525 std::string DatabaseManager::StatementBase::ReadString(size_t field) const 536 std::string DatabaseManager::StatementBase::ReadString(size_t field) const
526 { 537 {
527 const IValue& value = GetResultField(field); 538 const IValue& value = GetResultField(field);
528 539
529 switch (value.GetType()) 540 switch (value.GetType())