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 a default instance of the type.

SqlQuery<(Of <(T>)>)(T, String)
Create a new SqlQuery using the specified instance and query,

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.)
Query
Gets the query's text.

Template
Gets the object instance to be used for class matching and dynamic parameters.

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Remarks
SqlQuery provides an alternative means to query the space besides object matching. Usage: Construct a SqlQuery instance using an object instance, 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 in the instance you provide. 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 string query will operate as a wild card, meaning all instances of the type sent with the query are matched by the query. A null query uses the template provided with the query for matching. SqlQuery constructors that take no template for an argument, instantiate objects of the given type in the query and use it as a template. Supported in: Read, ReadIfExists, ReadMultiple, Take, TakeIfExists, TakeMultiple, Count, Clear, Notifications, ISpaceIterator.
Inheritance Hierarchy
Object
SqlQuery<(Of <(T>)>)
 SqlQuery

Assembly: GigaSpaces.Core (Module: GigaSpaces.Core) Version: 7.0.1.3800 (7.0.1.3800)