~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/create.cc

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
#include <drizzled/function/math/tan.h>
84
84
#include <drizzled/function/units.h>
85
85
 
86
 
#include "drizzled/function/cast/boolean.h"
87
86
#include "drizzled/function/cast/signed.h"
88
87
#include "drizzled/function/cast/time.h"
89
88
#include "drizzled/function/cast/unsigned.h"
2047
2046
  {
2048
2047
    func_name.assign(func->name.str, func->name.length);
2049
2048
 
2050
 
    FunctionContainer::getMap()[func_name]= func->builder;
 
2049
    FunctionContainer::getMap()[func_name]= func;
2051
2050
  }
2052
2051
 
2053
2052
  return 0;
2057
2056
Create_func *
2058
2057
find_native_function_builder(LEX_STRING name)
2059
2058
{
 
2059
  Native_func_registry *func;
2060
2060
  Create_func *builder= NULL;
2061
2061
 
2062
2062
  string func_name(name.str, name.length);
2063
2063
 
2064
 
  FunctionContainer::Map::iterator func_iter=
 
2064
  NativeFunctionsMap::iterator func_iter=
2065
2065
    FunctionContainer::getMap().find(func_name);
2066
2066
 
2067
2067
  if (func_iter != FunctionContainer::getMap().end())
2068
2068
  {
2069
 
    builder= (*func_iter).second;
 
2069
    func= (*func_iter).second;
 
2070
    builder= func->builder;
2070
2071
  }
2071
2072
 
2072
2073
  return builder;
2103
2104
    res= new (session->mem_root) Item_func_binary(a);
2104
2105
    break;
2105
2106
 
2106
 
  case ITEM_CAST_BOOLEAN:
2107
 
    res= new (session->mem_root) function::cast::Boolean(a);
2108
 
    break;
2109
 
 
2110
2107
  case ITEM_CAST_TIME:
2111
2108
    res= new (session->mem_root) function::cast::Time(a);
2112
2109
    break;