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.1.0.0 (4.1.0.0)

Syntax

C#
public virtual ICollection SearchCQ(
	ContinuousQuery query
)
Visual Basic
Public Overridable Function SearchCQ ( _
	query As ContinuousQuery _
) As ICollection
Visual C++
public:
virtual ICollection^ SearchCQ(
	ContinuousQuery^ query
)

Parameters

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

Examples

CopyC#
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));

ICollection results = cache.SearchCQ(query);

See Also