VMware Tanzu GemFire Native .NET Reference 10.3.0
Apache::Geode::Client::Query< TResult > Class Template Reference

Class to encapsulate a query. More...

#include <Query.hpp>

Public Member Functions

void Compile ()
 Compile the given query – NOT IMPLEMENTED. More...
 
ISelectResults< TResult > ^ Execute ()
 Executes the OQL Query on the cache server and returns the results. More...
 
ISelectResults< TResult > ^ Execute (array< Object^>^ paramList)
 Executes the OQL Parameterized Query on the cache server with the specified paramList and returns the results. More...
 
ISelectResults< TResult > ^ Execute (array< Object^>^ paramList, TimeSpan timeout)
 Executes the OQL Parameterized Query on the cache server with the specified paramList & timeout parameters and returns the results. More...
 
ISelectResults< TResult > ^ Execute (TimeSpan timeout)
 Executes the OQL Query on the cache server with the specified timeout and returns the results. More...
 

Properties

bool IsCompiled [get]
 Check if the query is compiled – NOT IMPLEMENTED. More...
 
String^ QueryString [get]
 Get the string for this query. More...
 

Detailed Description

template<class TResult>
class Apache::Geode::Client::Query< TResult >

Class to encapsulate a query.

A Query is obtained from a QueryService which in turn is obtained from the Cache. This can be executed to return SelectResults which can be either a ResultSet or a StructSet.

This class is intentionally not thread-safe. So multiple threads should not operate on the same Query object concurrently rather should have their own Query objects.

Member Function Documentation

◆ Compile()

template<class TResult >
void Apache::Geode::Client::Query< TResult >::Compile ( )

Compile the given query – NOT IMPLEMENTED.

◆ Execute() [1/4]

template<class TResult >
ISelectResults< TResult > ^ Apache::Geode::Client::Query< TResult >::Execute ( )

Executes the OQL Query on the cache server and returns the results.

The default timeout for the query is 15 secs.

Exceptions
QueryExceptionif some query error occurred at the server.
IllegalStateExceptionif some other error occurred.
NotConnectedExceptionif no java cache server is available. For pools configured with locators, if no locators are available, innerException of NotConnectedException is set to NoAvailableLocatorsException.
Returns
An ISelectResults object which can either be a ResultSet or a StructSet.

◆ Execute() [2/4]

template<class TResult >
ISelectResults< TResult > ^ Apache::Geode::Client::Query< TResult >::Execute ( array< Object^>^  paramList)

Executes the OQL Parameterized Query on the cache server with the specified paramList and returns the results.

The default timeout for the query is 15 secs.

Parameters
paramListThe Parameter List for the specified Query.
Exceptions
IllegalArgumentExceptionif timeout parameter is greater than 2^31/1000.
QueryExceptionif some query error occurred at the server.
IllegalStateExceptionif some other error occurred.
NotConnectedExceptionif no java cache server is available For pools configured with locators, if no locators are available, innerException of NotConnectedException is set to NoAvailableLocatorsException.
Returns
An ISelectResults object which can either be a ResultSet or a StructSet.

◆ Execute() [3/4]

template<class TResult >
ISelectResults< TResult > ^ Apache::Geode::Client::Query< TResult >::Execute ( array< Object^>^  paramList,
TimeSpan  timeout 
)

Executes the OQL Parameterized Query on the cache server with the specified paramList & timeout parameters and returns the results.

Parameters
paramListThe Parameter List for the specified Query.
timeoutThe time to wait for query response.
Exceptions
IllegalArgumentExceptionif timeout parameter is too long.
QueryExceptionif some query error occurred at the server.
IllegalStateExceptionif some other error occurred.
NotConnectedExceptionif no java cache server is available For pools configured with locators, if no locators are available, innerException of NotConnectedException is set to NoAvailableLocatorsException.
Returns
An ISelectResults object which can either be a ResultSet or a StructSet.

◆ Execute() [4/4]

template<class TResult >
ISelectResults< TResult > ^ Apache::Geode::Client::Query< TResult >::Execute ( TimeSpan  timeout)

Executes the OQL Query on the cache server with the specified timeout and returns the results.

Parameters
timeoutThe time to wait for query response.
Exceptions
IllegalArgumentExceptionif timeout parameter is greater than 2^31/1000.
QueryExceptionif some query error occurred at the server.
IllegalStateExceptionif some other error occurred.
NotConnectedExceptionif no java cache server is available For pools configured with locators, if no locators are available, innerException of NotConnectedException is set to NoAvailableLocatorsException.
Returns
An ISelectResults object which can either be a ResultSet or a StructSet.

Property Documentation

◆ IsCompiled

template<class TResult >
bool Apache::Geode::Client::Query< TResult >::IsCompiled
get

Check if the query is compiled – NOT IMPLEMENTED.

◆ QueryString

template<class TResult >
String^ Apache::Geode::Client::Query< TResult >::QueryString
get

Get the string for this query.


Apache Geode C++ Cache .NET API Documentation