~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/double.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
Remove unused Name_resolution_context::error_reporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
 
22
 
#include "config.h"
 
22
#include <config.h>
23
23
 
24
24
#include <float.h>
25
25
#include <math.h>
30
30
#include <drizzled/error.h>
31
31
#include <drizzled/table.h>
32
32
#include <drizzled/session.h>
33
 
#include "drizzled/internal/m_string.h"
 
33
#include <drizzled/current_session.h>
 
34
#include <drizzled/internal/m_string.h>
34
35
 
35
36
using namespace std;
36
37
 
41
42
  double precision floating point numbers
42
43
****************************************************************************/
43
44
 
44
 
int Field_double::store(const char *from,uint32_t len, const CHARSET_INFO * const cs)
 
45
int Field_double::store(const char *from,uint32_t len, const charset_info_st * const cs)
45
46
{
46
47
  int error;
47
48
  char *end;
83
84
                             (double) nr);
84
85
}
85
86
 
86
 
double Field_double::val_real(void)
 
87
double Field_double::val_real(void) const
87
88
{
88
89
  double j;
89
90
 
100
101
  return j;
101
102
}
102
103
 
103
 
int64_t Field_double::val_int(void)
 
104
int64_t Field_double::val_int(void) const
104
105
{
105
106
  double j;
106
107
  int64_t res;
143
144
}
144
145
 
145
146
 
146
 
String *Field_double::val_str(String *val_buffer,
147
 
                              String *)
 
147
String *Field_double::val_str(String *val_buffer, String *) const
148
148
{
149
149
  double nr;
150
150
 
209
209
  change_double_for_sort(nr, to);
210
210
}
211
211
 
212
 
 
213
 
void Field_double::sql_type(String &res) const
214
 
{
215
 
  const CHARSET_INFO * const cs=res.charset();
216
 
  if (dec == NOT_FIXED_DEC)
217
 
  {
218
 
    res.set_ascii(STRING_WITH_LEN("double"));
219
 
  }
220
 
  else
221
 
  {
222
 
    res.length(cs->cset->snprintf(cs,(char*) res.ptr(),res.alloced_length(),
223
 
                            "double(%d,%d)",(int) field_length,dec));
224
 
  }
225
 
}
226
 
 
227
212
} /* namespace drizzled */