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>)>)(String, String)|
Creates a new SqlQuery using the specified query and type name.
|SqlQuery<(Of <(T>)>)(Type, String, String)|
Initializes a new instance of theclass
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 or sets projection properties which specifies that a result for an operation using this query should contain data for the specified projection properties. Other properties which were not specifies as a projection will not contain data. By default, if no projection was added, all the properties are returned with full data.
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.
Get's the query's type name.
GigaSpaces.Core (Module: GigaSpaces.Core) Version: 22.214.171.12400 (126.96.36.19900)
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.