GigaSpaces XAP.NET Documentation
SqlQuery<(Of <(T>)>) Class
Class LibraryGigaSpaces.CoreSqlQuery<(Of <(T>)>)
Represents an Sql-like template you can use to query the space.
Declaration Syntax
C#Visual BasicVisual C++J#
public class SqlQuery<T> : IQuery<T>
Public Class SqlQuery(Of T) _
	Implements IQuery(Of T)
generic<typename T>
public ref class SqlQuery : IQuery<T>
J# supports the use of generic APIs, but not the declaration of new ones.
Generic Template Parameters
T
Type to be used in the instance.
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
SqlQuery<(Of <(T>)>)(String)
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)
Internal constructor

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Projections
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.

Query
Gets the query's text.

Routing
Gets or sets the value that controls this query routing behavior.

SetParameter(Int32, Object)
Sets the query parameter value, the number of parameters matches the number of question marks (?) in the query.

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
TypeName
Get's the query's type name.

Remarks
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.
Inheritance Hierarchy
Object
SqlQuery<(Of <(T>)>)
 View

Assembly: GigaSpaces.Core (Module: GigaSpaces.Core) Version: 12.2.0.0 (12.2.0.18000)