~ubuntu-branches/ubuntu/quantal/drizzle/quantal

« back to all changes in this revision

Viewing changes to drizzled/field/microtime.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-03-02 10:38:38 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110302103838-4ezi8b065c4bv329
Tags: 2011.03.11-0ubuntu1
* New upstream release.
* Sleep no longer an so.
* Re-add get-orig-source, but this time with working.
* New symbol added to libdrizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <config.h>
22
22
#include <boost/lexical_cast.hpp>
23
23
#include <drizzled/field/microtime.h>
24
24
#include <drizzled/error.h>
33
33
 
34
34
#include <boost/date_time/posix_time/posix_time.hpp>
35
35
 
36
 
#include "drizzled/temporal.h"
 
36
#include <drizzled/temporal.h>
37
37
 
38
38
namespace drizzled
39
39
{
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;