~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/num1.cc

  • Committer: Monty Taylor
  • Date: 2008-11-16 05:36:13 UTC
  • mto: (584.1.9 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116053613-bld4rqxhlkb49c02
Split out cache_row and type_holder.

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
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <drizzled/server_includes.h>
21
21
 
 
22
#include CSTDINT_H
22
23
#include <cassert>
23
24
 
24
 
#include <drizzled/function/num1.h>
25
 
 
26
 
namespace drizzled
27
 
{
 
25
#include <drizzled/functions/num1.h>
28
26
 
29
27
/**
30
28
  Set result type for a numeric function of one argument
38
36
  case INT_RESULT:
39
37
    unsigned_flag= args[0]->unsigned_flag;
40
38
    break;
41
 
 
42
39
  case STRING_RESULT:
43
40
  case REAL_RESULT:
44
41
    hybrid_type= REAL_RESULT;
45
42
    max_length= float_length(decimals);
46
43
    break;
47
 
 
48
44
  case DECIMAL_RESULT:
49
45
    break;
50
 
 
51
 
  case ROW_RESULT:
 
46
  default:
52
47
    assert(0);
53
48
  }
 
49
  return;
54
50
}
55
51
 
56
52
void Item_func_num1::fix_num_length_and_dec()
60
56
}
61
57
 
62
58
 
63
 
} /* namespace drizzled */
 
59