comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 5772:093a8693ba16 find-refactoring

replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Sep 2024 20:49:34 +0200
parents d52b3f394f69
children f96abfe08946
comparison
equal deleted inserted replaced
5771:4db9f897df58 5772:093a8693ba16
586 FindResponse::Resource& res = response.GetResourceByInternalId(s.ColumnInt64(0)); 586 FindResponse::Resource& res = response.GetResourceByInternalId(s.ColumnInt64(0));
587 res.AddLabel(s.ColumnString(1)); 587 res.AddLabel(s.ColumnString(1));
588 } 588 }
589 } 589 }
590 590
591 // need one instance identifier ? TODO: it might be actually more interesting to retrieve directly the attachment ids .... 591 if (request.IsRetrieveOneInstanceMetadataAndAttachments())
592 if (request.IsRetrieveOneInstanceIdentifier()) 592 {
593 { 593 throw OrthancException(ErrorCode_NotImplemented);
594
595 #if 0
596 // need one instance identifier ? TODO: it might be actually more interesting to retrieve directly the attachment ids ....
594 if (requestLevel == ResourceType_Series) 597 if (requestLevel == ResourceType_Series)
595 { 598 {
596 sql = "SELECT Lookup.internalId, childLevel.publicId " 599 sql = "SELECT Lookup.internalId, childLevel.publicId "
597 "FROM Resources AS childLevel " 600 "FROM Resources AS childLevel "
598 "INNER JOIN Lookup ON childLevel.parentId = Lookup.internalId "; 601 "INNER JOIN Lookup ON childLevel.parentId = Lookup.internalId ";
635 } 638 }
636 else 639 else
637 { 640 {
638 throw OrthancException(ErrorCode_InternalError); 641 throw OrthancException(ErrorCode_InternalError);
639 } 642 }
643 #endif
640 } 644 }
641 645
642 // need children metadata ? 646 // need children metadata ?
643 if (requestLevel <= ResourceType_Series && request.GetChildrenSpecification(static_cast<ResourceType>(requestLevel + 1)).GetMetadata().size() > 0) 647 if (requestLevel <= ResourceType_Series && request.GetChildrenSpecification(static_cast<ResourceType>(requestLevel + 1)).GetMetadata().size() > 0)
644 { 648 {