~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/time_functions.h

edit

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef DRIZZLED_TIME_FUNCTIONS_H
21
21
#define DRIZZLED_TIME_FUNCTIONS_H
22
22
 
23
 
#include <drizzled/sql_error.h>
24
 
#include <drizzled/type/time.h>
 
23
#include "drizzled/sql_error.h"
 
24
#include "drizzled/type/time.h"
25
25
 
26
26
namespace drizzled
27
27
{
73
73
  NOTE
74
74
    See description of str_to_datetime() for more information.
75
75
*/
76
 
type::timestamp_t str_to_datetime_with_warn(Session *session,
77
 
                                            const char *str, 
78
 
                                            uint32_t length,
79
 
                                            type::Time *l_time, 
80
 
                                            uint32_t flags);
 
76
enum enum_drizzle_timestamp_type str_to_datetime_with_warn(const char *str, 
 
77
                                                           uint32_t length,
 
78
                                                           type::Time *l_time, 
 
79
                                                           uint32_t flags);
81
80
 
82
81
/*
83
82
  Convert a time string to a type::Time struct and produce a warning
86
85
  NOTE
87
86
    See str_to_time() for more info.
88
87
*/
89
 
bool str_to_time_with_warn(Session *session, const char *str, uint32_t length, type::Time *l_time);
 
88
bool str_to_time_with_warn(const char *str, uint32_t length, type::Time *l_time);
 
89
 
 
90
/*
 
91
  Convert a system time structure to TIME
 
92
*/
 
93
void localtime_to_TIME(type::Time *to, struct tm *from);
 
94
 
 
95
void make_time(const type::Time *l_time, String *str);
 
96
 
 
97
void make_date(const type::Time *l_time, String *str);
 
98
 
 
99
void make_datetime(const type::Time *l_time, String *str);
90
100
 
91
101
void make_truncated_value_warning(Session *session, 
92
102
                                  DRIZZLE_ERROR::enum_warning_level level,
93
103
                                  const char *str_val,
94
104
                                  uint32_t str_length, 
95
 
                                  type::timestamp_t time_type,
 
105
                                  enum enum_drizzle_timestamp_type time_type,
96
106
                                  const char *field_name);
97
107
 
98
108
/*