comparison OrthancServer/Sources/Database/IDatabaseWrapper.h @ 5593:862b54b4cfe2 find-refactoring

implemented the default multi-stage find/expand
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 04 May 2024 11:35:34 +0200
parents b0b5546f1b9f
children 4640b7ae9a11
comparison
equal deleted inserted replaced
5592:1e2631b8b9af 5593:862b54b4cfe2
355 355
356 /** 356 /**
357 * Primitives introduced in Orthanc 1.12.4 357 * Primitives introduced in Orthanc 1.12.4
358 **/ 358 **/
359 359
360 // This is only implemented if "HasIntegratedFind()" is "true"
360 virtual void ExecuteFind(FindResponse& response, 361 virtual void ExecuteFind(FindResponse& response,
361 const FindRequest& request, 362 const FindRequest& request,
362 const std::vector<DatabaseConstraint>& normalized) = 0; 363 const std::vector<DatabaseConstraint>& normalized) = 0;
364
365 // This is only implemented if "HasIntegratedFind()" is "false"
366 virtual void ExecuteFind(std::list<std::string>& identifiers,
367 const FindRequest& request,
368 const std::vector<DatabaseConstraint>& normalized) = 0;
369
370 /**
371 * This is only implemented if "HasIntegratedFind()" is
372 * "false". In this flavor, the resource of interest might have
373 * been deleted, as the expansion is not done in the same
374 * transaction as the "ExecuteFind()". In such cases, the
375 * wrapper should not throw an exception, but simply ignore the
376 * request to expand the resource (i.e., "response" must not be
377 * modified).
378 **/
379 virtual void ExecuteExpand(FindResponse& response,
380 const FindRequest& request,
381 const std::string& identifier) = 0;
363 }; 382 };
364 383
365 384
366 virtual ~IDatabaseWrapper() 385 virtual ~IDatabaseWrapper()
367 { 386 {
382 IStorageArea& storageArea) = 0; 401 IStorageArea& storageArea) = 0;
383 402
384 virtual const Capabilities GetDatabaseCapabilities() const = 0; 403 virtual const Capabilities GetDatabaseCapabilities() const = 0;
385 404
386 virtual uint64_t MeasureLatency() = 0; 405 virtual uint64_t MeasureLatency() = 0;
406
407 // Returns "true" iff. the database engine supports the
408 // simultaneous find and expansion of resources.
409 virtual bool HasIntegratedFind() const = 0;
387 }; 410 };
388 } 411 }