~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/microsecond.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
21
 
#include CSTDINT_H
 
21
 
22
22
#include "drizzled/temporal.h"
23
23
#include "drizzled/error.h"
24
24
#include "drizzled/function/time/microsecond.h"
25
25
 
 
26
namespace drizzled
 
27
{
 
28
 
26
29
int64_t Item_func_microsecond::val_int()
27
30
{
28
31
  assert(fixed);
49
52
   *
50
53
   * Oh, and Brian Aker MADE me do this. :) --JRP
51
54
   */
52
 
  drizzled::Time temporal_time;
 
55
  Time temporal_time;
53
56
  
54
57
  char time_buff[DRIZZLE_MAX_LENGTH_DATETIME_AS_STRING];
55
58
  String tmp_time(time_buff,sizeof(time_buff), &my_charset_utf8_bin);
61
64
     * representing a time value, so we grab the first argument 
62
65
     * as a DateTime object and try that for a match...
63
66
     */
64
 
    drizzled::DateTime temporal_datetime;
 
67
    DateTime temporal_datetime;
65
68
    Item_result arg0_result_type= args[0]->result_type();
66
69
    
67
70
    switch (arg0_result_type)
116
119
  }
117
120
  return (int64_t) temporal_time.useconds();
118
121
}
 
122
 
 
123
} /* namespace drizzled */