~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cache_real.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-05 09:52:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110705095228-y4aejvsuyeezloqe
Refactor Items

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include <config.h>
21
 
#include <math.h>
 
21
#include <cmath>
22
22
#include <drizzled/item/cache_real.h>
23
23
 
24
 
namespace drizzled
25
 
{
 
24
namespace drizzled {
26
25
 
27
26
void Item_cache_real::store(Item *item)
28
27
{
30
29
  null_value= item->null_value;
31
30
}
32
31
 
33
 
 
34
32
int64_t Item_cache_real::val_int()
35
33
{
36
34
  assert(fixed == 1);
37
35
  return (int64_t) rint(value);
38
36
}
39
37
 
40
 
 
41
38
String* Item_cache_real::val_str(String *str)
42
39
{
43
40
  assert(fixed == 1);
45
42
  return str;
46
43
}
47
44
 
48
 
 
49
45
type::Decimal *Item_cache_real::val_decimal(type::Decimal *decimal_val)
50
46
{
51
47
  assert(fixed == 1);