Mercurial > hg > orthanc-databases
diff 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 |
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.cpp Wed Dec 13 15:48:56 2023 +0100 +++ b/Framework/Common/DatabaseManager.cpp Wed Dec 13 16:52:06 2023 +0100 @@ -492,7 +492,7 @@ return dynamic_cast<const Integer64Value&>(value).GetValue(); default: - //LOG(ERROR) << value.Format(); + // LOG(ERROR) << value.GetType(); throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); } } @@ -521,7 +521,18 @@ } } - + bool DatabaseManager::StatementBase::IsNull(size_t field) const + { + if (IsDone()) + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); + } + else + { + return GetResultField(field).GetType() == ValueType_Null; + } + } + std::string DatabaseManager::StatementBase::ReadString(size_t field) const { const IValue& value = GetResultField(field);