blob: e6b38aedddd2e46a4daf16ad4e5f77b6bef7e0ea [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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>&nbsp; Apache Ignite C++: query_sql.h Source File</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="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="projectlogo"><img alt="Logo" src="ignite_logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">&nbsp; Apache Ignite C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<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>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_1d5505cee217f179c88903b7091c150e.html">cache</a></li><li class="navelem"><a class="el" href="dir_13c1d00a1be9b016a133dec12b890b36.html">query</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">query_sql.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="query__sql_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * this work for additional information regarding copyright ownership.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance with</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#ifndef _IGNITE_CACHE_QUERY_QUERY_SQL</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#define _IGNITE_CACHE_QUERY_QUERY_SQL</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;ignite/impl/cache/query/query_argument.h&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="binary__raw__writer_8h.html">ignite/binary/binary_raw_writer.h</a>&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceignite.html">ignite</a></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keyword">namespace </span>cache</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; {</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">namespace </span>query</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; {</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html"> 44</a></span>&#160; <span class="keyword">class </span><a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html">SqlQuery</a></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; {</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aaa012e38597bf19751ebfb44642d1eec"> 53</a></span>&#160; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aaa012e38597bf19751ebfb44642d1eec">SqlQuery</a>(<span class="keyword">const</span> std::string&amp; type, <span class="keyword">const</span> std::string&amp; sql) :</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; type(type),</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; sql(sql),</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; pageSize(1024),</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; loc(false),</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; distributedJoins(false),</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; args()</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="comment">// No-op.</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; }</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#afd18d1a83311dc68fe37629846849bc1"> 69</a></span>&#160; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#afd18d1a83311dc68fe37629846849bc1">SqlQuery</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html">SqlQuery</a>&amp; other) :</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; type(other.type),</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; sql(other.sql),</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; pageSize(other.pageSize),</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; loc(other.loc),</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; distributedJoins(other.distributedJoins),</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; args()</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; {</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; args.reserve(other.args.size());</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">typedef</span> std::vector&lt;impl::cache::query::QueryArgumentBase*&gt;::const_iterator Iter;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">for</span> (Iter i = other.args.begin(); i != other.args.end(); ++i)</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; args.push_back((*i)-&gt;Copy());</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; }</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ac31b6077c52d6875b0b5ebd8634b37e5"> 90</a></span>&#160; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html">SqlQuery</a>&amp; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ac31b6077c52d6875b0b5ebd8634b37e5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html">SqlQuery</a>&amp; other) </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; {</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;other)</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html">SqlQuery</a> tmp(other);</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5591e0ffb6e596985bc9fc575d838c89">Swap</a>(tmp);</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; }</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; }</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#af486d65c8b0004ec7fb1633b1400c986"> 105</a></span>&#160; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#af486d65c8b0004ec7fb1633b1400c986">~SqlQuery</a>()</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; {</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="keyword">typedef</span> std::vector&lt;impl::cache::query::QueryArgumentBase*&gt;::const_iterator Iter;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordflow">for</span> (Iter it = args.begin(); it != args.end(); ++it)</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keyword">delete</span> *it;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; }</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5591e0ffb6e596985bc9fc575d838c89"> 118</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5591e0ffb6e596985bc9fc575d838c89">Swap</a>(<a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html">SqlQuery</a>&amp; other)</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; {</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;other)</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; {</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; std::swap(type, other.type);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; std::swap(sql, other.sql);</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; std::swap(pageSize, other.pageSize);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; std::swap(loc, other.loc);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; std::swap(distributedJoins, other.distributedJoins);</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; std::swap(args, other.args);</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; }</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; }</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a387e39f4999587a8a28841c0646a9572"> 136</a></span>&#160; <span class="keyword">const</span> std::string&amp; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a387e39f4999587a8a28841c0646a9572">GetType</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordflow">return</span> type;</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; }</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5609ce4f4005383181bf24c0768a7846"> 146</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5609ce4f4005383181bf24c0768a7846">SetType</a>(<span class="keyword">const</span> std::string&amp; type)</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; {</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; this-&gt;type = type;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; }</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a55915234f00d90623bc1d972954dd377"> 156</a></span>&#160; <span class="keyword">const</span> std::string&amp; <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a55915234f00d90623bc1d972954dd377">GetSql</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordflow">return</span> sql;</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; }</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aa4e9e9a79ea5ddbf8c8c0aada68f3b6d"> 166</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aa4e9e9a79ea5ddbf8c8c0aada68f3b6d">SetSql</a>(<span class="keyword">const</span> std::string&amp; sql)</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; {</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; this-&gt;sql = sql;</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; }</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a291f621c4efd4f7de894230718e5098a"> 176</a></span>&#160; int32_t <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a291f621c4efd4f7de894230718e5098a">GetPageSize</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keywordflow">return</span> pageSize;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; }</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aadf500528211e00a43cf7b87c0d0051f"> 186</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aadf500528211e00a43cf7b87c0d0051f">SetPageSize</a>(int32_t pageSize)</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; {</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; this-&gt;pageSize = pageSize;</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; }</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ad0e00541ef3e200bbde603079cf29d8d"> 196</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ad0e00541ef3e200bbde603079cf29d8d">IsLocal</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keywordflow">return</span> loc;</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; }</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a907b6e4a5c4ea7ca6f80a3b687091f22"> 206</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a907b6e4a5c4ea7ca6f80a3b687091f22">SetLocal</a>(<span class="keywordtype">bool</span> loc)</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; {</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; this-&gt;loc = loc;</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; }</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a87ce4576992dad0a4e15e2a48d51e881"> 216</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a87ce4576992dad0a4e15e2a48d51e881">IsDistributedJoins</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="keywordflow">return</span> distributedJoins;</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; }</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aeb4896f55a3231852a8840eab1758f3c"> 229</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aeb4896f55a3231852a8840eab1758f3c">SetDistributedJoins</a>(<span class="keywordtype">bool</span> enabled)</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; {</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; distributedJoins = enabled;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; }</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ac12b5dbd6439fe7f50d6eb86c06a06ea"> 244</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ac12b5dbd6439fe7f50d6eb86c06a06ea">AddArgument</a>(<span class="keyword">const</span> T&amp; arg)</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; {</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; args.push_back(<span class="keyword">new</span> impl::cache::query::QueryArgument&lt;T&gt;(arg));</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; }</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; </div>
<div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a8cd0867cc21f034ce965bdafa21412e6"> 252</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a8cd0867cc21f034ce965bdafa21412e6">ClearArguments</a>()</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; {</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; std::vector&lt;impl::cache::query::QueryArgumentBase*&gt;::iterator iter;</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="keywordflow">for</span> (iter = args.begin(); iter != args.end(); ++iter)</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="keyword">delete</span> *iter;</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; args.clear();</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; }</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a0bcba60e838f99e71066f69a930f61da"> 266</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a0bcba60e838f99e71066f69a930f61da">Write</a>(<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html">binary::BinaryRawWriter</a>&amp; writer)<span class="keyword"> const</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a2d7c6d2302b55a1bc4e249d19a72ec1b">WriteBool</a>(loc);</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a7b9237e03749f5e27d57d6a926ba49b2">WriteString</a>(sql);</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a7b9237e03749f5e27d57d6a926ba49b2">WriteString</a>(type);</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a9aec134f65d3ef66601736de0a956382">WriteInt32</a>(pageSize);</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; </div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a9aec134f65d3ef66601736de0a956382">WriteInt32</a>(<span class="keyword">static_cast&lt;</span>int32_t<span class="keyword">&gt;</span>(args.size()));</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; std::vector&lt;impl::cache::query::QueryArgumentBase*&gt;::const_iterator it;</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <span class="keywordflow">for</span> (it = args.begin(); it != args.end(); ++it)</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; (*it)-&gt;Write(writer);</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; </div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a2d7c6d2302b55a1bc4e249d19a72ec1b">WriteBool</a>(distributedJoins);</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a9aec134f65d3ef66601736de0a956382">WriteInt32</a>(0); <span class="comment">// Timeout, ms</span></div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; writer.<a class="code" href="classignite_1_1binary_1_1BinaryRawWriter.html#a2d7c6d2302b55a1bc4e249d19a72ec1b">WriteBool</a>(<span class="keyword">false</span>); <span class="comment">// ReplicatedOnly</span></div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; }</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; </div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; std::string type;</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; std::string sql;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; int32_t pageSize;</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; </div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordtype">bool</span> loc;</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; </div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordtype">bool</span> distributedJoins;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; std::vector&lt;impl::cache::query::QueryArgumentBase*&gt; args;</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; };</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; }</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; } </div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;}</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; </div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160;<span class="preprocessor">#endif //_IGNITE_CACHE_QUERY_QUERY_SQL</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a5609ce4f4005383181bf24c0768a7846"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5609ce4f4005383181bf24c0768a7846">ignite::cache::query::SqlQuery::SetType</a></div><div class="ttdeci">void SetType(const std::string &amp;type)</div><div class="ttdoc">Set type name.</div><div class="ttdef"><b>Definition:</b> query_sql.h:146</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_aadf500528211e00a43cf7b87c0d0051f"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aadf500528211e00a43cf7b87c0d0051f">ignite::cache::query::SqlQuery::SetPageSize</a></div><div class="ttdeci">void SetPageSize(int32_t pageSize)</div><div class="ttdoc">Set page size.</div><div class="ttdef"><b>Definition:</b> query_sql.h:186</div></div>
<div class="ttc" id="anamespaceignite_html"><div class="ttname"><a href="namespaceignite.html">ignite</a></div><div class="ttdoc">Apache Ignite API.</div><div class="ttdef"><b>Definition:</b> cache.h:48</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_af486d65c8b0004ec7fb1633b1400c986"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#af486d65c8b0004ec7fb1633b1400c986">ignite::cache::query::SqlQuery::~SqlQuery</a></div><div class="ttdeci">~SqlQuery()</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> query_sql.h:105</div></div>
<div class="ttc" id="aclassignite_1_1binary_1_1BinaryRawWriter_html_a9aec134f65d3ef66601736de0a956382"><div class="ttname"><a href="classignite_1_1binary_1_1BinaryRawWriter.html#a9aec134f65d3ef66601736de0a956382">ignite::binary::BinaryRawWriter::WriteInt32</a></div><div class="ttdeci">void WriteInt32(int32_t val)</div><div class="ttdoc">Write 32-byte signed integer.</div><div class="ttdef"><b>Definition:</b> binary_raw_writer.cpp:72</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a387e39f4999587a8a28841c0646a9572"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a387e39f4999587a8a28841c0646a9572">ignite::cache::query::SqlQuery::GetType</a></div><div class="ttdeci">const std::string &amp; GetType() const</div><div class="ttdoc">Get type name.</div><div class="ttdef"><b>Definition:</b> query_sql.h:136</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_ac31b6077c52d6875b0b5ebd8634b37e5"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ac31b6077c52d6875b0b5ebd8634b37e5">ignite::cache::query::SqlQuery::operator=</a></div><div class="ttdeci">SqlQuery &amp; operator=(const SqlQuery &amp;other)</div><div class="ttdoc">Assignment operator.</div><div class="ttdef"><b>Definition:</b> query_sql.h:90</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_afd18d1a83311dc68fe37629846849bc1"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#afd18d1a83311dc68fe37629846849bc1">ignite::cache::query::SqlQuery::SqlQuery</a></div><div class="ttdeci">SqlQuery(const SqlQuery &amp;other)</div><div class="ttdoc">Copy constructor.</div><div class="ttdef"><b>Definition:</b> query_sql.h:69</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a291f621c4efd4f7de894230718e5098a"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a291f621c4efd4f7de894230718e5098a">ignite::cache::query::SqlQuery::GetPageSize</a></div><div class="ttdeci">int32_t GetPageSize() const</div><div class="ttdoc">Get page size.</div><div class="ttdef"><b>Definition:</b> query_sql.h:176</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a907b6e4a5c4ea7ca6f80a3b687091f22"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a907b6e4a5c4ea7ca6f80a3b687091f22">ignite::cache::query::SqlQuery::SetLocal</a></div><div class="ttdeci">void SetLocal(bool loc)</div><div class="ttdoc">Set local flag.</div><div class="ttdef"><b>Definition:</b> query_sql.h:206</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_ac12b5dbd6439fe7f50d6eb86c06a06ea"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ac12b5dbd6439fe7f50d6eb86c06a06ea">ignite::cache::query::SqlQuery::AddArgument</a></div><div class="ttdeci">void AddArgument(const T &amp;arg)</div><div class="ttdoc">Add argument.</div><div class="ttdef"><b>Definition:</b> query_sql.h:244</div></div>
<div class="ttc" id="aclassignite_1_1binary_1_1BinaryRawWriter_html"><div class="ttname"><a href="classignite_1_1binary_1_1BinaryRawWriter.html">ignite::binary::BinaryRawWriter</a></div><div class="ttdoc">Binary raw writer.</div><div class="ttdef"><b>Definition:</b> binary_raw_writer.h:55</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a55915234f00d90623bc1d972954dd377"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a55915234f00d90623bc1d972954dd377">ignite::cache::query::SqlQuery::GetSql</a></div><div class="ttdeci">const std::string &amp; GetSql() const</div><div class="ttdoc">Get SQL string.</div><div class="ttdef"><b>Definition:</b> query_sql.h:156</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_aa4e9e9a79ea5ddbf8c8c0aada68f3b6d"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aa4e9e9a79ea5ddbf8c8c0aada68f3b6d">ignite::cache::query::SqlQuery::SetSql</a></div><div class="ttdeci">void SetSql(const std::string &amp;sql)</div><div class="ttdoc">Set SQL string.</div><div class="ttdef"><b>Definition:</b> query_sql.h:166</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a0bcba60e838f99e71066f69a930f61da"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a0bcba60e838f99e71066f69a930f61da">ignite::cache::query::SqlQuery::Write</a></div><div class="ttdeci">void Write(binary::BinaryRawWriter &amp;writer) const</div><div class="ttdoc">Write query info to the stream.</div><div class="ttdef"><b>Definition:</b> query_sql.h:266</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a5591e0ffb6e596985bc9fc575d838c89"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a5591e0ffb6e596985bc9fc575d838c89">ignite::cache::query::SqlQuery::Swap</a></div><div class="ttdeci">void Swap(SqlQuery &amp;other)</div><div class="ttdoc">Efficiently swaps contents with another SqlQuery instance.</div><div class="ttdef"><b>Definition:</b> query_sql.h:118</div></div>
<div class="ttc" id="aclassignite_1_1binary_1_1BinaryRawWriter_html_a7b9237e03749f5e27d57d6a926ba49b2"><div class="ttname"><a href="classignite_1_1binary_1_1BinaryRawWriter.html#a7b9237e03749f5e27d57d6a926ba49b2">ignite::binary::BinaryRawWriter::WriteString</a></div><div class="ttdeci">void WriteString(const char *val)</div><div class="ttdoc">Write string.</div><div class="ttdef"><b>Definition:</b> binary_raw_writer.cpp:152</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_ad0e00541ef3e200bbde603079cf29d8d"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#ad0e00541ef3e200bbde603079cf29d8d">ignite::cache::query::SqlQuery::IsLocal</a></div><div class="ttdeci">bool IsLocal() const</div><div class="ttdoc">Get local flag.</div><div class="ttdef"><b>Definition:</b> query_sql.h:196</div></div>
<div class="ttc" id="aclassignite_1_1binary_1_1BinaryRawWriter_html_a2d7c6d2302b55a1bc4e249d19a72ec1b"><div class="ttname"><a href="classignite_1_1binary_1_1BinaryRawWriter.html#a2d7c6d2302b55a1bc4e249d19a72ec1b">ignite::binary::BinaryRawWriter::WriteBool</a></div><div class="ttdeci">void WriteBool(bool val)</div><div class="ttdoc">Write bool.</div><div class="ttdef"><b>Definition:</b> binary_raw_writer.cpp:42</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a8cd0867cc21f034ce965bdafa21412e6"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a8cd0867cc21f034ce965bdafa21412e6">ignite::cache::query::SqlQuery::ClearArguments</a></div><div class="ttdeci">void ClearArguments()</div><div class="ttdoc">Remove all added arguments.</div><div class="ttdef"><b>Definition:</b> query_sql.h:252</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_aeb4896f55a3231852a8840eab1758f3c"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aeb4896f55a3231852a8840eab1758f3c">ignite::cache::query::SqlQuery::SetDistributedJoins</a></div><div class="ttdeci">void SetDistributedJoins(bool enabled)</div><div class="ttdoc">Specify if distributed joins are enabled for this query.</div><div class="ttdef"><b>Definition:</b> query_sql.h:229</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_a87ce4576992dad0a4e15e2a48d51e881"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#a87ce4576992dad0a4e15e2a48d51e881">ignite::cache::query::SqlQuery::IsDistributedJoins</a></div><div class="ttdeci">bool IsDistributedJoins() const</div><div class="ttdoc">Check if distributed joins are enabled for this query.</div><div class="ttdef"><b>Definition:</b> query_sql.h:216</div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html_aaa012e38597bf19751ebfb44642d1eec"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html#aaa012e38597bf19751ebfb44642d1eec">ignite::cache::query::SqlQuery::SqlQuery</a></div><div class="ttdeci">SqlQuery(const std::string &amp;type, const std::string &amp;sql)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> query_sql.h:53</div></div>
<div class="ttc" id="abinary__raw__writer_8h_html"><div class="ttname"><a href="binary__raw__writer_8h.html">binary_raw_writer.h</a></div></div>
<div class="ttc" id="aclassignite_1_1cache_1_1query_1_1SqlQuery_html"><div class="ttname"><a href="classignite_1_1cache_1_1query_1_1SqlQuery.html">ignite::cache::query::SqlQuery</a></div><div class="ttdoc">Sql query.</div><div class="ttdef"><b>Definition:</b> query_sql.h:44</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 10 2022 11:02:04 for &nbsp; Apache Ignite C++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>