MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Aggregator_simple Class Reference

#include <item_sum.h>

Inheritance diagram for Aggregator_simple:
Collaboration diagram for Aggregator_simple:

Public Member Functions

 Aggregator_simple (Item_sum *sum)
Aggregator_type Aggrtype ()
bool setup (THD *thd)
void clear ()
bool add ()
void endup ()
virtual my_decimalarg_val_decimal (my_decimal *value)
virtual double arg_val_real ()
virtual bool arg_is_null ()
- Public Member Functions inherited from Aggregator
 Aggregator (Item_sum *arg)

Additional Inherited Members

- Public Types inherited from Aggregator
enum  Aggregator_type { SIMPLE_AGGREGATOR, DISTINCT_AGGREGATOR }
- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)
- Protected Attributes inherited from Aggregator
Item_sumitem_sum
bool use_distinct_values

Detailed Description

The pass-through aggregator. Implements AGGFN (DISTINCT ..) by knowing it gets distinct data on input. So it just pumps them back to the Item_sum descendant class.

Definition at line 631 of file item_sum.h.

Member Function Documentation

bool Aggregator_simple::add ( )
inlinevirtual

Called when there's a new value to be aggregated. Updates the internal state of the aggregator to reflect the new value.

Implements Aggregator.

Definition at line 641 of file item_sum.h.

bool Aggregator_simple::arg_is_null ( )
virtual

NULLness of being-aggregated argument; can be called only after arg_val_decimal() or arg_val_real().

Implements Aggregator.

Definition at line 1500 of file item_sum.cc.

my_decimal * Aggregator_simple::arg_val_decimal ( my_decimal value)
virtual

Decimal value of being-aggregated argument

Implements Aggregator.

Definition at line 1488 of file item_sum.cc.

double Aggregator_simple::arg_val_real ( )
virtual

Floating point value of being-aggregated argument

Implements Aggregator.

Definition at line 1494 of file item_sum.cc.

void Aggregator_simple::clear ( )
inlinevirtual

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.

Implements Aggregator.

Definition at line 640 of file item_sum.h.

void Aggregator_simple::endup ( )
inlinevirtual

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.

Implements Aggregator.

Definition at line 642 of file item_sum.h.

bool Aggregator_simple::setup ( THD *  )
inlinevirtual

Called before adding the first row. Allocates and sets up the internal aggregation structures used, e.g. the Unique instance used to calculate distinct.

Implements Aggregator.

Definition at line 639 of file item_sum.h.


The documentation for this class was generated from the following files: