~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/numhybrid.h

  • Committer: Brian Aker
  • Date: 2009-08-04 06:21:17 UTC
  • mfrom: (1108.2.2 merge)
  • Revision ID: brian@gaz-20090804062117-fef8x6y3ydzrvab3
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
 
23
23
#include <drizzled/function/func.h>
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
class Item_func_numhybrid: public Item_func
29
26
{
30
27
protected:
31
28
  Item_result hybrid_type;
32
29
public:
33
 
  Item_func_numhybrid(): Item_func(), hybrid_type(REAL_RESULT)
34
 
  {}
35
30
  Item_func_numhybrid(Item *a) :Item_func(a), hybrid_type(REAL_RESULT)
36
31
  {}
37
32
  Item_func_numhybrid(Item *a,Item *b)
48
43
 
49
44
  double val_real();
50
45
  int64_t val_int();
51
 
  type::Decimal *val_decimal(type::Decimal *);
 
46
  my_decimal *val_decimal(my_decimal *);
52
47
  String *val_str(String*str);
53
48
 
54
49
  /**
77
72
       - The same pointer it was given, with the area initialized to the
78
73
         result of the operation.
79
74
  */
80
 
  virtual type::Decimal *decimal_op(type::Decimal *)= 0;
 
75
  virtual my_decimal *decimal_op(my_decimal *)= 0;
81
76
 
82
77
  /**
83
78
     @brief Performs the operation that this functions implements when the
89
84
  bool is_null() { update_null_value(); return null_value; }
90
85
};
91
86
 
92
 
} /* namespace drizzled */
93
 
 
94
87
#endif /* DRIZZLED_FUNCTION_NUMHYBRID_H */