Represents an Sql-like template you can use to query the space.
Generic Template Parameters
- Type to be used in the instance.
Creates a new SqlQuery using the specified query and the generic type.
|SqlQuery<(Of <(T>)>)(T, String)|| Obsolete.|
Create a new SqlQuery using the specified instance and query,
|SqlQuery<(Of <(T>)>)(String, String)|
Creates a new SqlQuery using the specified query and type name.
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.(Inherited from Object.)
Serves as a hash function for a particular type.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Gets the query's text.
Gets or sets the value that controls this query routing behavior.
Sets the query parameter value, the number of parameters matches the number of question marks (?) in the query.
Gets the object instance to be used for class matching and dynamic parameters.
GigaSpaces.Core (Module: GigaSpaces.Core) Version: 18.104.22.16880 (22.214.171.12480)
SqlQuery provides an alternative means to query the space besides object matching. Usage: Construct a SqlQuery instance with a generic type of the desired object type, and the query you want to perform. The query syntax is very similar to the WHERE part of a SQL query. You can specify dynamic parameters in the query using question marks (?), and these values are replaced by the matching fields that were placed using the SetParameter(Int32, Object) method. Main advantages of using SqlQuery: * Extended matching - Object matching means each field is matched using equality if it is not null. Other kinds of matching (greater than, less than, etc.) are not supported in Object matching, but can be implemented using a SqlQuery. * Complex matching - Object matching allows you to match each field only once. If you need to implement a more complex query (say, age > 67 AND gender = male OR age > 65 AND gender=female), you can use a SqlQuery to implement it. * Readability - SQL is a well known standard that many developers are familiar with. Using a SqlQuery makes it easier to understand your query. Disadvanteges: * Performance - Naturally, some matches are executed quicker using Object matching than SqlQuery. The SqlQuery code is optimized to notice (in most cases) which type of matching is quicker, and behave accordingly. However, the analysis overhead is still an issue when using SqlQuery, so if you have a query that can be implemented using simple matching, you probably shouldn't use SqlQuery. Behavior: A zero length or null string query will operate as a wild card, meaning all instances of the generic type of the SqlQuery are matched by the query. Supported in: Read, ReadIfExists, ReadMultiple, Take, TakeIfExists, TakeMultiple, Count, Clear, Notifications, ISpaceIterator.