~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Brian Aker
  • Date: 2011-01-04 04:05:27 UTC
  • mto: (2057.2.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2064.
  • Revision ID: brian@tangent.org-20110104040527-w2xglgjmlet2hy1p
First pass on micro timestamp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include "drizzled/field/epoch.h"
45
45
#include "drizzled/field/int32.h"
46
46
#include "drizzled/field/int64.h"
 
47
#include "drizzled/field/microtime.h"
47
48
#include "drizzled/field/null.h"
48
49
#include "drizzled/field/real.h"
49
50
#include "drizzled/field/size.h"
1065
1066
    case DRIZZLE_TYPE_DATE:
1066
1067
    case DRIZZLE_TYPE_DATETIME:
1067
1068
    case DRIZZLE_TYPE_TIMESTAMP:
 
1069
    case DRIZZLE_TYPE_MICROTIME:
1068
1070
      return true;
1069
1071
    case DRIZZLE_TYPE_BLOB:
1070
1072
    case DRIZZLE_TYPE_VARCHAR:
1195
1197
  case DRIZZLE_TYPE_DATE:
1196
1198
    field= new Field_date(maybe_null, name, &my_charset_bin);
1197
1199
    break;
 
1200
 
 
1201
  case DRIZZLE_TYPE_MICROTIME:
 
1202
    field= new field::Microtime(maybe_null, name);
 
1203
    break;
 
1204
 
1198
1205
  case DRIZZLE_TYPE_TIMESTAMP:
1199
 
    field= new field::Epoch(maybe_null, name, &my_charset_bin);
 
1206
    field= new field::Epoch(maybe_null, name);
1200
1207
    break;
1201
1208
  case DRIZZLE_TYPE_DATETIME:
1202
1209
    field= new Field_datetime(maybe_null, name, &my_charset_bin);
1400
1407
      break;
1401
1408
    }
1402
1409
  case DRIZZLE_TYPE_DATETIME:
 
1410
  case DRIZZLE_TYPE_MICROTIME:
1403
1411
  case DRIZZLE_TYPE_TIMESTAMP:
1404
1412
    {
1405
1413
      type::Time tm;
1637
1645
    */
1638
1646
    if ((type= item->field_type()) == DRIZZLE_TYPE_DATETIME ||
1639
1647
        type == DRIZZLE_TYPE_TIME ||
 
1648
        type == DRIZZLE_TYPE_MICROTIME ||
1640
1649
        type == DRIZZLE_TYPE_DATE ||
1641
1650
        type == DRIZZLE_TYPE_TIMESTAMP)
1642
1651
    {