Performs search on the Cache based on the specified ContinuousQuery and registers the notifications.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.3.0.0 (4.3.0.0)

Syntax

C#
public virtual IDictionary SearchEntriesCQ(
	ContinuousQuery query
)
Visual Basic
Public Overridable Function SearchEntriesCQ ( 
	query As ContinuousQuery
) As IDictionary
Visual C++
public:
virtual IDictionary^ SearchEntriesCQ(
	ContinuousQuery^ query
)

Parameters

query
Type: Alachisoft.NCache.Web.Caching..::..ContinuousQuery
ContinuousQuery to perform the search and register notifications for.

Return Value

Type: IDictionary

Examples

 Copy imageCopy
string queryString = "SELECT MyApplication.Employee WHERE this.Salary > ?";

Hashtable values = new Hashtable();
values.Add("Salary", 50000);

ContinuousQuery query = new ContinuousQuery(queryString, values);

query.RegisterAddNotification(new ContinuousQueryItemAddedCallback(query_ItemAdded));
query.RegisterUpdateNotification(new ContinuousQueryItemUpdatedCallback(query_ItemUpdated));
query.RegisterRemoveNotification(new ContinuousQueryItemRemovedCallback(query_ItemRemoved));

IDictionary results = cache.SearchEntriesCQ(query);

See Also