~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Padraig O'Sullivan
  • Date: 2009-08-08 04:22:33 UTC
  • mto: (1115.3.4 captain)
  • mto: This revision was merged to the branch mainline in revision 1117.
  • Revision ID: osullivan.padraig@gmail.com-20090808042233-q0z88zc490z3f3r7
Renamed the Command class to be Statement. Renamed the command directory to
statement and also the command header file to statement. Updated various
source files to reflect this renaming.

Show diffs side-by-side

added added

removed removed

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