Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 5805:8a8756b2dd0b find-refactoring tip
cleanup
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 23 Sep 2024 16:03:02 +0200 |
parents | 25df40a274fd |
children |
comparison
equal
deleted
inserted
replaced
5804:25df40a274fd | 5805:8a8756b2dd0b |
---|---|
1274 const std::set<ChangeType>& filterType) ORTHANC_OVERRIDE | 1274 const std::set<ChangeType>& filterType) ORTHANC_OVERRIDE |
1275 { | 1275 { |
1276 std::vector<std::string> filters; | 1276 std::vector<std::string> filters; |
1277 bool hasSince = false; | 1277 bool hasSince = false; |
1278 bool hasTo = false; | 1278 bool hasTo = false; |
1279 // bool hasFilterType = false; | |
1280 | 1279 |
1281 if (since > 0) | 1280 if (since > 0) |
1282 { | 1281 { |
1283 hasSince = true; | 1282 hasSince = true; |
1284 filters.push_back("seq>?"); | 1283 filters.push_back("seq>?"); |
1288 hasTo = true; | 1287 hasTo = true; |
1289 filters.push_back("seq<=?"); | 1288 filters.push_back("seq<=?"); |
1290 } | 1289 } |
1291 if (filterType.size() != 0) | 1290 if (filterType.size() != 0) |
1292 { | 1291 { |
1293 // hasFilterType = true; | |
1294 filters.push_back("changeType IN ( " + JoinChanges(filterType) + " )"); | 1292 filters.push_back("changeType IN ( " + JoinChanges(filterType) + " )"); |
1295 } | 1293 } |
1296 | 1294 |
1297 std::string filtersString; | 1295 std::string filtersString; |
1298 if (filters.size() > 0) | 1296 if (filters.size() > 0) |
1325 } | 1323 } |
1326 if (hasTo) | 1324 if (hasTo) |
1327 { | 1325 { |
1328 s.BindInt64(paramCounter++, to); | 1326 s.BindInt64(paramCounter++, to); |
1329 } | 1327 } |
1330 // if (hasFilterType) | 1328 |
1331 // { | |
1332 // s.BindInt(paramCounter++, filterType); | |
1333 // } | |
1334 s.BindInt(paramCounter++, limit + 1); // we take limit+1 because we use the +1 to know if "Done" must be set to true | 1329 s.BindInt(paramCounter++, limit + 1); // we take limit+1 because we use the +1 to know if "Done" must be set to true |
1335 GetChangesInternal(target, done, s, limit, returnFirstResults); | 1330 GetChangesInternal(target, done, s, limit, returnFirstResults); |
1336 } | 1331 } |
1337 | 1332 |
1338 | 1333 |