Click or drag to resize

RedisQueryPersistenceServiceRegisterQuerySet Method

Registers a new query result set with the stateful query provider

Namespace: SanteDB.Caching.Redis
Assembly: SanteDB.Caching.Redis (in SanteDB.Caching.Redis.dll) Version: 3.0.2081-alpha+ce906ccc8091ff0a3c40d1fff3e2485e75a86c5b
Syntax
public bool RegisterQuerySet(
	Guid queryId,
	IEnumerable<Guid> results,
	Object tag,
	int totalResults
)

Parameters

queryId  Guid
The unique identifier for the query
results  IEnumerableGuid
The results (initial or total) to be stored in the query
tag  Object
A user tag for the query result set which can be used in implementation specific contexts
totalResults  Int32
The total number of results in the query set

Return Value

Boolean
True if the query set was registered successfully

Implements

IQueryPersistenceServiceRegisterQuerySet(Guid, IEnumerableGuid, Object, Int32)
Remarks

This method registers a new query with the stateful query provider and provides an initial set of results in the result. The totalResults and results arrays may represent a partial or preliminary count and series of results. To prevent wasted loading of data from the database, only the key identifiers of the results in the query set should be retrieved and stored in the query set.

It is possible for callers to further load more results into the query result set using the AddResults(Guid, IEnumerableGuid, Int32) method. For example, the ADO.NET provider only loads and counts the first 200 results for an initial return, and then appends the full query result keys to the stateful query.

See Also