~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/type/time.cc

  • Committer: Brian Aker
  • Date: 2011-01-20 06:31:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: brian@tangent.org-20110120063131-zxb0w5iwfhxn37zb
Place limits on timestamp (unforunatly)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1336
1336
  return 0;
1337
1337
}
1338
1338
 
 
1339
namespace type {
 
1340
 
 
1341
void Time::convert(uint64_t &datetime, timestamp_t arg)
 
1342
{
 
1343
  switch (arg)
 
1344
  {
 
1345
  case type::DRIZZLE_TIMESTAMP_DATETIME:
 
1346
    datetime= TIME_to_uint64_t_datetime(this);
 
1347
    break;
 
1348
 
 
1349
  case type::DRIZZLE_TIMESTAMP_DATE:
 
1350
    datetime= TIME_to_uint64_t_date(this);
 
1351
    break;
 
1352
 
 
1353
  case type::DRIZZLE_TIMESTAMP_TIME:
 
1354
    datetime= TIME_to_uint64_t_time(this);
 
1355
    break;
 
1356
 
 
1357
  case type::DRIZZLE_TIMESTAMP_NONE:
 
1358
  case type::DRIZZLE_TIMESTAMP_ERROR:
 
1359
    datetime= 0;
 
1360
  }
 
1361
}
 
1362
 
 
1363
} // namespace type
 
1364
 
1339
1365
} /* namespace drizzled */