Mercurial > hg > orthanc-databases
comparison PostgreSQL/Plugins/PostgreSQLIndex.cpp @ 209:13a3863df7fa
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 19 Mar 2021 17:01:38 +0100 |
parents | 42990b2dd51b |
children | fbb52129158a |
comparison
equal
deleted
inserted
replaced
208:696bc0c9fddb | 209:13a3863df7fa |
---|---|
377 } | 377 } |
378 } | 378 } |
379 #endif | 379 #endif |
380 | 380 |
381 | 381 |
382 uint64_t PostgreSQLIndex::GetResourceCount(OrthancPluginResourceType resourceType) | 382 uint64_t PostgreSQLIndex::GetResourcesCount(OrthancPluginResourceType resourceType) |
383 { | 383 { |
384 // Optimized version thanks to the "FastCountResources.sql" extension | 384 // Optimized version thanks to the "FastCountResources.sql" extension |
385 | 385 |
386 assert(OrthancPluginResourceType_Patient == 0 && | 386 assert(OrthancPluginResourceType_Patient == 0 && |
387 OrthancPluginResourceType_Study == 1 && | 387 OrthancPluginResourceType_Study == 1 && |
406 statement.Execute(args); | 406 statement.Execute(args); |
407 | 407 |
408 result = static_cast<uint64_t>(ReadInteger64(statement, 0)); | 408 result = static_cast<uint64_t>(ReadInteger64(statement, 0)); |
409 } | 409 } |
410 | 410 |
411 assert(result == IndexBackend::GetResourceCount(resourceType)); | 411 assert(result == IndexBackend::GetResourcesCount(resourceType)); |
412 return result; | 412 return result; |
413 } | 413 } |
414 | 414 |
415 | 415 |
416 int64_t PostgreSQLIndex::GetLastChangeIndex() | 416 int64_t PostgreSQLIndex::GetLastChangeIndex() |