forked from lalor/mysql56-annotation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassAggregator.html
314 lines (281 loc) · 18.7 KB
/
classAggregator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>My Project: Aggregator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">My Project
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="#friends">Friends</a> </div>
<div class="headertitle">
<div class="title">Aggregator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="Aggregator" --><!-- doxytag: inherits="Sql_alloc" -->
<p><code>#include <<a class="el" href="item__sum_8h_source.html">item_sum.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for Aggregator:</div>
<div class="dyncontent">
<div class="center">
<img src="classAggregator.png" usemap="#Aggregator_map" alt=""/>
<map id="Aggregator_map" name="Aggregator_map">
<area href="classSql__alloc.html" alt="Sql_alloc" shape="rect" coords="66,0,188,24"/>
<area href="classAggregator__distinct.html" alt="Aggregator_distinct" shape="rect" coords="0,112,122,136"/>
<area href="classAggregator__simple.html" alt="Aggregator_simple" shape="rect" coords="132,112,254,136"/>
</map>
</div></div>
<p><a href="classAggregator-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>Aggregator_type</b> { <b>SIMPLE_AGGREGATOR</b>,
<b>DISTINCT_AGGREGATOR</b>
}</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9419dfc50b0b7e5e977a81b3bd8ddda"></a><!-- doxytag: member="Aggregator::Aggregator" ref="ad9419dfc50b0b7e5e977a81b3bd8ddda" args="(Item_sum *arg)" -->
 </td><td class="memItemRight" valign="bottom"><b>Aggregator</b> (<a class="el" href="classItem__sum.html">Item_sum</a> *arg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa839d991497a8872e05da159b5ae7970"></a><!-- doxytag: member="Aggregator::Aggrtype" ref="aa839d991497a8872e05da159b5ae7970" args="()=0" -->
virtual Aggregator_type </td><td class="memItemRight" valign="bottom"><b>Aggrtype</b> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#afcde359558a43054f7812a72498a263f">setup</a> (THD *)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#ad416a800e9cdec7908dd3e9bdffa70e5">clear</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#a70e0d53834f2672f3ec57c96e35a9a60">add</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#a726ef59a61b219b87c0a6041f8162037">endup</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classmy__decimal.html">my_decimal</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#a0965a66058cd00c581b015b9c571cb07">arg_val_decimal</a> (<a class="el" href="classmy__decimal.html">my_decimal</a> *value)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#addca16d20f7cc2640f3843c2c5e7596d">arg_val_real</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classAggregator.html#a2581c04dee61cf1a4d72519da64baf53">arg_is_null</a> (bool use_null_value)=0</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0c8f75d3d70dff740412d52b63ea3e40"></a><!-- doxytag: member="Aggregator::item_sum" ref="a0c8f75d3d70dff740412d52b63ea3e40" args="" -->
<a class="el" href="classItem__sum.html">Item_sum</a> * </td><td class="memItemRight" valign="bottom"><b>item_sum</b></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdaf2fcbe4bca3f9cf9e54d9302c0d69"></a><!-- doxytag: member="Aggregator::Item_sum" ref="afdaf2fcbe4bca3f9cf9e54d9302c0d69" args="" -->
class </td><td class="memItemRight" valign="bottom"><b>Item_sum</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2afeb7cbcc97ddd2c3c74cf87352e0ab"></a><!-- doxytag: member="Aggregator::Item_sum_sum" ref="a2afeb7cbcc97ddd2c3c74cf87352e0ab" args="" -->
class </td><td class="memItemRight" valign="bottom"><b>Item_sum_sum</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acfaf1c17289ab0e71cb92e85c6e40ee5"></a><!-- doxytag: member="Aggregator::Item_sum_count" ref="acfaf1c17289ab0e71cb92e85c6e40ee5" args="" -->
class </td><td class="memItemRight" valign="bottom"><b>Item_sum_count</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43563950efa7ae2387d3389fae2c0d09"></a><!-- doxytag: member="Aggregator::Item_sum_avg" ref="a43563950efa7ae2387d3389fae2c0d09" args="" -->
class </td><td class="memItemRight" valign="bottom"><b>Item_sum_avg</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The abstract base class for the Aggregator_* classes. It implements the data collection functions (setup/add/clear) as either pass-through to the real functionality or as collectors into an Unique (for distinct) structure.</p>
<p>Note that update_field/reset_field are not in that class, because they're simply not called when GROUP BY/DISTINCT can be handled with help of index on grouped fields (quick_group = 0); </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a70e0d53834f2672f3ec57c96e35a9a60"></a><!-- doxytag: member="Aggregator::add" ref="a70e0d53834f2672f3ec57c96e35a9a60" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool <a class="el" href="classAggregator.html#a70e0d53834f2672f3ec57c96e35a9a60">Aggregator::add</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called when there's a new value to be aggregated. Updates the internal state of the aggregator to reflect the new value. </p>
<p>Implemented in <a class="el" href="classAggregator__simple.html#aa3b0160d86a60634bd390596bd524c7a">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#af72d7cc1082245015c41e99893992a4f">Aggregator_distinct</a>.</p>
</div>
</div>
<a class="anchor" id="a2581c04dee61cf1a4d72519da64baf53"></a><!-- doxytag: member="Aggregator::arg_is_null" ref="a2581c04dee61cf1a4d72519da64baf53" args="(bool use_null_value)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool <a class="el" href="classAggregator.html#a2581c04dee61cf1a4d72519da64baf53">Aggregator::arg_is_null</a> </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>use_null_value</em></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>NULLness of being-aggregated argument.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">use_null_value</td><td>Optimization: to determine if the argument is NULL we must, in the general case, call is_null() on it, which itself might call val_*() on it, which might be costly. If you just have called arg_val*(), you can pass use_null_value=true; this way, <a class="el" href="classAggregator.html#a2581c04dee61cf1a4d72519da64baf53">arg_is_null()</a> might avoid is_null() and instead do a cheap read of the <a class="el" href="classItem.html">Item</a>'s null_value (updated by arg_val*()). </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classAggregator__simple.html#a89edab7b2334ef55dd1848094cdb4331">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#a213b0657e2fcd03305629d78c68b31ad">Aggregator_distinct</a>.</p>
</div>
</div>
<a class="anchor" id="a0965a66058cd00c581b015b9c571cb07"></a><!-- doxytag: member="Aggregator::arg_val_decimal" ref="a0965a66058cd00c581b015b9c571cb07" args="(my_decimal *value)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classmy__decimal.html">my_decimal</a>* <a class="el" href="classAggregator.html#a0965a66058cd00c581b015b9c571cb07">Aggregator::arg_val_decimal</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmy__decimal.html">my_decimal</a> * </td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Decimal value of being-aggregated argument </p>
<p>Implemented in <a class="el" href="classAggregator__simple.html#aeaf3d769df20c4c91476dd661da758f7">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#a60e5fc048746277c661ce97e9fc92905">Aggregator_distinct</a>.</p>
</div>
</div>
<a class="anchor" id="addca16d20f7cc2640f3843c2c5e7596d"></a><!-- doxytag: member="Aggregator::arg_val_real" ref="addca16d20f7cc2640f3843c2c5e7596d" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual double <a class="el" href="classAggregator.html#addca16d20f7cc2640f3843c2c5e7596d">Aggregator::arg_val_real</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Floating point value of being-aggregated argument </p>
<p>Implemented in <a class="el" href="classAggregator__simple.html#adaa482bd0ba91275f559a4eae95686c0">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#a3485cfa42d584711c4c95a3405f4a2ad">Aggregator_distinct</a>.</p>
</div>
</div>
<a class="anchor" id="ad416a800e9cdec7908dd3e9bdffa70e5"></a><!-- doxytag: member="Aggregator::clear" ref="ad416a800e9cdec7908dd3e9bdffa70e5" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void <a class="el" href="classAggregator.html#ad416a800e9cdec7908dd3e9bdffa70e5">Aggregator::clear</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called when we need to wipe out all the data from the aggregator : all the values acumulated and all the state. Cleans up the internal structures and resets them to their initial state. </p>
<p>Implemented in <a class="el" href="classAggregator__simple.html#a1bc4a3b483c68b07ac0c2472e868d1a2">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#acb3c9529bc839900fc63eb890a5e2aee">Aggregator_distinct</a>.</p>
</div>
</div>
<a class="anchor" id="a726ef59a61b219b87c0a6041f8162037"></a><!-- doxytag: member="Aggregator::endup" ref="a726ef59a61b219b87c0a6041f8162037" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void <a class="el" href="classAggregator.html#a726ef59a61b219b87c0a6041f8162037">Aggregator::endup</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called when there are no more data and the final value is to be retrieved. Finalises the state of the aggregator, so the final result can be retrieved. </p>
<p>Implemented in <a class="el" href="classAggregator__simple.html#a57c8435c2131160c58f8c1e6cce37542">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#a474d5f42f784572ea3b7d28be0fc3b2e">Aggregator_distinct</a>.</p>
</div>
</div>
<a class="anchor" id="afcde359558a43054f7812a72498a263f"></a><!-- doxytag: member="Aggregator::setup" ref="afcde359558a43054f7812a72498a263f" args="(THD *)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool <a class="el" href="classAggregator.html#afcde359558a43054f7812a72498a263f">Aggregator::setup</a> </td>
<td>(</td>
<td class="paramtype">THD * </td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called before adding the first row. Allocates and sets up the internal aggregation structures used, e.g. the Unique instance used to calculate distinct. </p>
<p>Implemented in <a class="el" href="classAggregator__simple.html#a5ba27dcd45b797485c888a36a5cc4bd3">Aggregator_simple</a>, and <a class="el" href="classAggregator__distinct.html#ac01d658918e5e160779ccfaf1134943b">Aggregator_distinct</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="item__sum_8h_source.html">item_sum.h</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></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>
<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 16 2015 12:34:48 for My Project by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>