Performs search on the Cache based on the query specified.
Namespace: Alachisoft.NCache.Web.CachingAssembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)
Syntax
C# |
---|
public override IDictionary SearchEntries( string query, IDictionary values ) |
Visual Basic |
---|
Public Overrides Function SearchEntries ( _ query As String, _ values As IDictionary _ ) As IDictionary |
Visual C++ |
---|
public: virtual IDictionary^ SearchEntries( String^ query, IDictionary^ values ) override |
Parameters
- query
- Type: System..::..String
simple SQL like query syntax t oquery objects from cache
- values
- Type: System.Collections..::..IDictionary
The IDictionary of atribute names and values.
Return Value
Returns a dictionary containing cache keys and associated objectsExamples
These operators are supported by NCache Queries.
1. Comparison Operators = , == , != , <> , < , > , <=, >=, IN
2. Logical Operators AND , OR , NOT
3. Miscellaneous () , DateTime.Now , DateTime("any date time compatible string")
CopyC#
Hashtable values = new Hashtable(); values.add("Name", "Paul Jones"); "select Test.Application.Employee where this.Name = ?" values.add("Salary", 2000); "select Test.Application.Employee where this.Salary > ?" values.Add("Name", "Paul jones"); values.Add("Salary", 2000); "select Test.Application.Employee where this.Name = ? and this.Salary > ?" values.Add("Name", "Paul Jones"); values.Add("Salary", 2000); "select Test.Application.Employee where Not(this.Name = 'Paul Jones' and this.Salary > 2000)"