~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/microtime.cc

  • Committer: Brian Aker
  • Date: 2011-02-20 21:00:32 UTC
  • mfrom: (2181.2.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110220210032-fc9g8qugt0n1yjr6
Brian Aker 2011-02-20 Merge in additional header bits for strerror_r
Brian Aker 2011-02-20 Create CONST on additional Field methods.
Brian Aker 2011-02-19 Further commit const on field.
Brian Aker 2011-02-18 This fixes DEBUG based compiles.
Brian Aker 2011-02-18 Protect all of the val_* methods from modification.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
  return 0;
159
159
}
160
160
 
161
 
double Microtime::val_real(void)
 
161
double Microtime::val_real(void) const
162
162
{
163
163
  uint64_t temp;
164
164
  type::Time::usec_t micro_temp;
180
180
  return result;
181
181
}
182
182
 
183
 
type::Decimal *Microtime::val_decimal(type::Decimal *decimal_value)
 
183
type::Decimal *Microtime::val_decimal(type::Decimal *decimal_value) const
184
184
{
185
185
  type::Time ltime;
186
186
 
189
189
  return date2_class_decimal(&ltime, decimal_value);
190
190
}
191
191
 
192
 
int64_t Microtime::val_int(void)
 
192
int64_t Microtime::val_int(void) const
193
193
{
194
194
  uint64_t temp;
195
195
 
207
207
  return result;
208
208
}
209
209
 
210
 
String *Microtime::val_str(String *val_buffer, String *)
 
210
String *Microtime::val_str(String *val_buffer, String *) const
211
211
{
212
212
  uint64_t temp= 0;
213
213
  type::Time::usec_t micro_temp= 0;
224
224
  return val_buffer;
225
225
}
226
226
 
227
 
bool Microtime::get_date(type::Time &ltime, uint32_t)
 
227
bool Microtime::get_date(type::Time &ltime, uint32_t) const
228
228
{
229
229
  uint64_t temp;
230
230
  uint32_t micro_temp= 0;
239
239
  return false;
240
240
}
241
241
 
242
 
bool Microtime::get_time(type::Time &ltime)
 
242
bool Microtime::get_time(type::Time &ltime) const
243
243
{
244
244
  return Microtime::get_date(ltime, 0);
245
245
}
294
294
  pack_num(fractional_seconds, ptr +8);
295
295
}
296
296
 
297
 
long Microtime::get_timestamp(bool *null_value)
 
297
long Microtime::get_timestamp(bool *null_value) const
298
298
{
299
299
  if ((*null_value= is_null()))
300
300
    return 0;