Mercurial > hg > orthanc
diff OrthancServer/DatabaseWrapper.cpp @ 199:dfa2899d9960
refactoring cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Nov 2012 16:20:22 +0100 |
parents | 663cc6c46d0a |
children | 9c58b2b03cf0 |
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp Tue Nov 27 15:49:42 2012 +0100 +++ b/OrthancServer/DatabaseWrapper.cpp Tue Nov 27 16:20:22 2012 +0100 @@ -461,6 +461,22 @@ } + void DatabaseWrapper::GetChildrenInternalId(std::list<int64_t>& result, + int64_t id) + { + SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT a.internalId FROM Resources AS a, Resources AS b " + "WHERE a.parentId = b.internalId AND b.internalId = ?"); + s.BindInt(0, id); + + result.clear(); + + while (s.Step()) + { + result.push_back(s.ColumnInt(0)); + } + } + + void DatabaseWrapper::LogChange(ChangeType changeType, int64_t internalId, ResourceType resourceType,