Click or drag to resize

IQueryPersistenceService Interface

Defines a service which can store the results of a query for later retrieval

Namespace: SanteDB.Core.Services
Assembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntax
public interface IQueryPersistenceService : IServiceImplementation

The IQueryPersistenceService type exposes the following members.

Properties
 NameDescription
Public propertyServiceName Gets the service name
(Inherited from IServiceImplementation)
Top
Methods
 NameDescription
Public methodAbortQuerySet Abort the query queryId
Public methodAddResults Adds more results to an already registered stateful query
Public methodFindQueryId Locate the stateful query identifier using the tag which was attached to the query
Public methodGetQueryResults Retrieves the result keys located between offset and offset+count in the stateful query provider
Public methodGetQueryTag Retrieves the query tag stored when the query was registered, for the specified queryId
Public methodIsRegistered Returns true if the query identifier has been registered
Public methodQueryResultTotalQuantity Count the number of query results which have been registered for queryId
Public methodRegisterQuerySet Registers a new query result set with the stateful query provider
Public methodSetQueryTag Adds or changes the query tag on queryId to value
Top
Remarks

When implementing query on a shared infrastructure such as the SanteDB iCDR or dCDR, it is important that consistent result sets be returned. This is important not only for user interfaces, but is vital to consistent synchronization across devices.

There are several reasons we keep stateful query result sets in SanteDB:

  • User interfaces will have consistent pages, so results don't magically "appear" between paging results
  • Synchronization processes have a consistent paging result set as they download data
  • The heavy initial query is done only once and results are merely accessed afterwards

Implementers of this service should ensure that whatever technology they are using to store queries have the capability of expiration (i.e. queries are not stateful indefinitely), support the rapid read and update of result sets, and are cabable of being aborted/abandoned.

See Also