Click or drag to resize

IQueryPersistenceServiceRegisterQuerySet Method

Registers a new query result set with the stateful query provider

Namespace:  SanteDB.Core.Services
Assembly:  SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntax
bool RegisterQuerySet(
	Guid queryId,
	IEnumerable<Guid> results,
	Object tag,
	int totalResults
)

Parameters

queryId
Type: SystemGuid
The unique identifier for the query
results
Type: System.Collections.GenericIEnumerableGuid
The results (initial or total) to be stored in the query
tag
Type: SystemObject
A user tag for the query result set which can be used in implementation specific contexts
totalResults
Type: SystemInt32
The total number of results in the query set

Return Value

Type: Boolean
True if the query set was registered successfully
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