95
int Uuid::store_decimal(const drizzled::my_decimal*)
94
int Uuid::store_decimal(const drizzled::type::Decimal*)
97
96
ASSERT_COLUMN_MARKED_FOR_WRITE;
98
97
my_error(ER_INVALID_UUID_VALUE, MYF(ME_FATALERROR));
137
136
String *Uuid::val_str(String *val_buffer, String *)
139
138
const CHARSET_INFO * const cs= &my_charset_bin;
140
uint32_t mlength= (uuid_st::DISPLAY_BUFFER_LENGTH) * cs->mbmaxlen;
139
uint32_t mlength= (type::Uuid::DISPLAY_BUFFER_LENGTH) * cs->mbmaxlen;
143
142
val_buffer->alloc(mlength);
144
143
char *buffer=(char*) val_buffer->ptr();
149
148
uu.unparse(buffer);
151
val_buffer->length(uuid_st::DISPLAY_LENGTH);
150
val_buffer->length(type::Uuid::DISPLAY_LENGTH);
153
152
return val_buffer;
156
155
void Uuid::sort_string(unsigned char *to, uint32_t length_arg)
158
assert(length_arg == uuid_st::LENGTH);
157
assert(length_arg == type::Uuid::LENGTH);
159
158
memcpy(to, ptr, length_arg);
162
bool Uuid::get_date(DRIZZLE_TIME *ltime, uint32_t )
161
bool Uuid::get_date(type::Time <ime, uint32_t )
168
167
if (uu.isTimeType())
171
169
struct timeval ret_tv;
173
ret_tv.tv_sec= ret_tv.tv_usec= 0;
171
memset(&ret_tv, 0, sizeof(struct timeval));
177
temporal.from_time_t(ret_tv.tv_sec);
179
ltime->time_type= DRIZZLE_TIMESTAMP_DATETIME;
180
ltime->year= temporal.years();
181
ltime->month= temporal.months();
182
ltime->day= temporal.days();
183
ltime->hour= temporal.hours();
184
ltime->minute= temporal.minutes();
185
ltime->second= temporal.seconds();
186
ltime->second_part= temporal.nseconds();
190
memset(ltime, 0, sizeof(DRIZZLE_TIME));
195
bool Uuid::get_time(DRIZZLE_TIME *ltime)
184
bool Uuid::get_time(type::Time <ime)
197
186
return get_date(ltime, 0);