blob: 6968210ef093b26a947ae68a9d9080dcb9910e2d [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Apache Geode Native C++ Reference: apache::geode::client::Query Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Apache Geode Native C++ Reference
&#160;<span id="projectnumber">1.13.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00807.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">apache::geode::client::Query Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>A <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> is obtained from a <a class="el" href="a00811.html" title="QueryService is the class obtained from a Cache.">QueryService</a> which in turn is obtained from the <a class="el" href="a00287.html" title="Caches are obtained from the create method on the CacheFactory#create class.">Cache</a>.
<a href="a00807.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3204746b2ccad832e96c211b1bb9497a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00807.html#a3204746b2ccad832e96c211b1bb9497a">compile</a> ()=0</td></tr>
<tr class="memdesc:a3204746b2ccad832e96c211b1bb9497a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile the <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> - client side query compilation is not supported. <a href="#a3204746b2ccad832e96c211b1bb9497a">More...</a><br /></td></tr>
<tr class="separator:a3204746b2ccad832e96c211b1bb9497a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a303f46d2be832f73fbb90096305192a1"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="a00851.html">SelectResults</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00807.html#a303f46d2be832f73fbb90096305192a1">execute</a> (std::chrono::milliseconds timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT)=0</td></tr>
<tr class="memdesc:a303f46d2be832f73fbb90096305192a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the OQL <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> on the cache server and returns the results. <a href="#a303f46d2be832f73fbb90096305192a1">More...</a><br /></td></tr>
<tr class="separator:a303f46d2be832f73fbb90096305192a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50c63cf9268acbc5e5406349de7c16c9"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="a00851.html">SelectResults</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00807.html#a50c63cf9268acbc5e5406349de7c16c9">execute</a> (std::shared_ptr&lt; <a class="el" href="a00291.html">CacheableVector</a> &gt; paramList, std::chrono::milliseconds timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT)=0</td></tr>
<tr class="memdesc:a50c63cf9268acbc5e5406349de7c16c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the parameterized OQL <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> on the cache server and returns the results. <a href="#a50c63cf9268acbc5e5406349de7c16c9">More...</a><br /></td></tr>
<tr class="separator:a50c63cf9268acbc5e5406349de7c16c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a340733f198ec219a743368c07bc32e7d"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00807.html#a340733f198ec219a743368c07bc32e7d">getQueryString</a> () const =0</td></tr>
<tr class="memdesc:a340733f198ec219a743368c07bc32e7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the query string provided when a new <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> was created from a <a class="el" href="a00811.html" title="QueryService is the class obtained from a Cache.">QueryService</a>. <a href="#a340733f198ec219a743368c07bc32e7d">More...</a><br /></td></tr>
<tr class="separator:a340733f198ec219a743368c07bc32e7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae398308c9952ac883cc05e31efd60451"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00807.html#ae398308c9952ac883cc05e31efd60451">isCompiled</a> ()=0</td></tr>
<tr class="memdesc:ae398308c9952ac883cc05e31efd60451"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> is compiled - client side query compilation is not supported. <a href="#ae398308c9952ac883cc05e31efd60451">More...</a><br /></td></tr>
<tr class="separator:ae398308c9952ac883cc05e31efd60451"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> is obtained from a <a class="el" href="a00811.html" title="QueryService is the class obtained from a Cache.">QueryService</a> which in turn is obtained from the <a class="el" href="a00287.html" title="Caches are obtained from the create method on the CacheFactory#create class.">Cache</a>. </p>
<p>This can be executed to return <a class="el" href="a00851.html" title="A SelectResults is obtained by executing a Query on the server.">SelectResults</a> which can be either a <a class="el" href="a00847.html" title="A ResultSet may be obtained after executing a Query which is obtained from a QueryService which in tu...">ResultSet</a> or a <a class="el" href="a00863.html" title="A StructSet may be obtained after executing a Query which is obtained from a QueryService which in tu...">StructSet</a>.</p>
<p>This class is intentionally not thread-safe. So multiple threads should not operate on the same <code><a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a></code> object concurrently rather should have their own <code><a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a></code> objects. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a3204746b2ccad832e96c211b1bb9497a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3204746b2ccad832e96c211b1bb9497a">&#9670;&nbsp;</a></span>compile()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void apache::geode::client::Query::compile </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compile the <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> - client side query compilation is not supported. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00535.html" title="Thrown when an operation unsupported by the current configuration is attempted.">UnsupportedOperationException</a></td><td>because this is not currently supported. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a303f46d2be832f73fbb90096305192a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a303f46d2be832f73fbb90096305192a1">&#9670;&nbsp;</a></span>execute() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::shared_ptr&lt;<a class="el" href="a00851.html">SelectResults</a>&gt; apache::geode::client::Query::execute </td>
<td>(</td>
<td class="paramtype">std::chrono::milliseconds&#160;</td>
<td class="paramname"><em>timeout</em> = <code>DEFAULT_QUERY_RESPONSE_TIMEOUT</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Executes the OQL <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> on the cache server and returns the results. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">timeout</td><td>The time to wait for query response, optional.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00471.html" title="Thrown when an argument to a method is illegal.">IllegalArgumentException</a></td><td>If timeout exceeds 2147483647ms. </td></tr>
<tr><td class="paramname"><a class="el" href="a00631.html" title="Thrown when query exception occurs at the server.">QueryException</a></td><td>if some query error occurred at the server. </td></tr>
<tr><td class="paramname"><a class="el" href="a00475.html" title="Thrown when the state of cache is manipulated to be illegal.">IllegalStateException</a></td><td>if some error occurred. </td></tr>
<tr><td class="paramname"><a class="el" href="a00575.html" title="Thrown when an operation is attempted before connecting to the distributed system.">NotConnectedException</a></td><td>if no java cache server is available. For pools configured with locators, if no locators are available, the cause of <a class="el" href="a00575.html" title="Thrown when an operation is attempted before connecting to the distributed system.">NotConnectedException</a> is set to <a class="el" href="a00683.html" title="Thrown if the No locators are active to reply for new connection.">NoAvailableLocatorsException</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A smart pointer to the <a class="el" href="a00851.html" title="A SelectResults is obtained by executing a Query on the server.">SelectResults</a> which can either be a <a class="el" href="a00847.html" title="A ResultSet may be obtained after executing a Query which is obtained from a QueryService which in tu...">ResultSet</a> or a <a class="el" href="a00863.html" title="A StructSet may be obtained after executing a Query which is obtained from a QueryService which in tu...">StructSet</a>. </dd></dl>
</div>
</div>
<a id="a50c63cf9268acbc5e5406349de7c16c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50c63cf9268acbc5e5406349de7c16c9">&#9670;&nbsp;</a></span>execute() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::shared_ptr&lt;<a class="el" href="a00851.html">SelectResults</a>&gt; apache::geode::client::Query::execute </td>
<td>(</td>
<td class="paramtype">std::shared_ptr&lt; <a class="el" href="a00291.html">CacheableVector</a> &gt;&#160;</td>
<td class="paramname"><em>paramList</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::chrono::milliseconds&#160;</td>
<td class="paramname"><em>timeout</em> = <code>DEFAULT_QUERY_RESPONSE_TIMEOUT</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Executes the parameterized OQL <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> on the cache server and returns the results. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">paramList</td><td>The query parameters list </td></tr>
<tr><td class="paramname">timeout</td><td>The time to wait for query response, optional.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00471.html" title="Thrown when an argument to a method is illegal.">IllegalArgumentException</a></td><td>If timeout exceeds 2147483647ms. </td></tr>
<tr><td class="paramname"><a class="el" href="a00631.html" title="Thrown when query exception occurs at the server.">QueryException</a></td><td>if some query error occurred at the server. </td></tr>
<tr><td class="paramname"><a class="el" href="a00475.html" title="Thrown when the state of cache is manipulated to be illegal.">IllegalStateException</a></td><td>if some error occurred. </td></tr>
<tr><td class="paramname"><a class="el" href="a00575.html" title="Thrown when an operation is attempted before connecting to the distributed system.">NotConnectedException</a></td><td>if no java cache server is available. For pools configured with locators, if no locators are available, the cause of <a class="el" href="a00575.html" title="Thrown when an operation is attempted before connecting to the distributed system.">NotConnectedException</a> is set to <a class="el" href="a00683.html" title="Thrown if the No locators are active to reply for new connection.">NoAvailableLocatorsException</a>. returns A smart pointer to the <a class="el" href="a00851.html" title="A SelectResults is obtained by executing a Query on the server.">SelectResults</a> which can either be a <a class="el" href="a00847.html" title="A ResultSet may be obtained after executing a Query which is obtained from a QueryService which in tu...">ResultSet</a> or a <a class="el" href="a00863.html" title="A StructSet may be obtained after executing a Query which is obtained from a QueryService which in tu...">StructSet</a>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a340733f198ec219a743368c07bc32e7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a340733f198ec219a743368c07bc32e7d">&#9670;&nbsp;</a></span>getQueryString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual const std::string&amp; apache::geode::client::Query::getQueryString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the query string provided when a new <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> was created from a <a class="el" href="a00811.html" title="QueryService is the class obtained from a Cache.">QueryService</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>The query string. </dd></dl>
</div>
</div>
<a id="ae398308c9952ac883cc05e31efd60451"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae398308c9952ac883cc05e31efd60451">&#9670;&nbsp;</a></span>isCompiled()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool apache::geode::client::Query::isCompiled </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check whether the <a class="el" href="a00807.html" title="A Query is obtained from a QueryService which in turn is obtained from the Cache.">Query</a> is compiled - client side query compilation is not supported. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00535.html" title="Thrown when an operation unsupported by the current configuration is attempted.">UnsupportedOperationException</a></td><td>because this is not currently supported. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<HR><address style="align: right;"><small>Apache Geode C++ Cache API Documentation</small></address>