Mercurial > hg > orthanc
diff OrthancServer/DatabaseWrapperBase.cpp @ 1750:55d52567bebb db-changes
LookupResource implemented
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Oct 2015 12:45:50 +0100 |
parents | d143db00a794 |
children | 318c2e83c2bd |
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapperBase.cpp Tue Oct 27 10:54:51 2015 +0100 +++ b/OrthancServer/DatabaseWrapperBase.cpp Tue Oct 27 12:45:50 2015 +0100 @@ -533,6 +533,20 @@ return static_cast<uint64_t>(s.ColumnInt64(0)); } + void DatabaseWrapperBase::GetAllInternalIds(std::list<int64_t>& target, + ResourceType resourceType) + { + SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT internalId FROM Resources WHERE resourceType=?"); + s.BindInt(0, resourceType); + + target.clear(); + while (s.Step()) + { + target.push_back(s.ColumnInt64(0)); + } + } + + void DatabaseWrapperBase::GetAllPublicIds(std::list<std::string>& target, ResourceType resourceType) {