~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/date.h

  • Committer: Brian Aker
  • Date: 2010-12-17 00:08:06 UTC
  • mfrom: (2002.1.4 clean)
  • Revision ID: brian@tangent.org-20101217000806-fa6kmggjnhsl4q85
Rollup for field encapsulation, monty fix for bzrignore, and Andrew bug
fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
20
20
#ifndef DRIZZLED_FUNCTION_TIME_DATE_H
21
21
#define DRIZZLED_FUNCTION_TIME_DATE_H
22
22
 
23
 
#include <drizzled/function/func.h>
24
 
#include <drizzled/function/str/strfunc.h>
 
23
#include "drizzled/function/func.h"
 
24
#include "drizzled/function/str/strfunc.h"
25
25
#include <drizzled/temporal.h>
26
26
 
27
27
namespace drizzled
64
64
    return tmp_table_field_from_field_type(table, 0);
65
65
  }
66
66
  bool result_as_int64_t() { return true; }
67
 
  type::Decimal *val_decimal(type::Decimal *decimal_value)
 
67
  my_decimal *val_decimal(my_decimal *decimal_value)
68
68
  {
69
69
    assert(fixed == 1);
70
70
    return  val_decimal_from_date(decimal_value);
92
92
  }
93
93
  bool result_as_int64_t() { return true; }
94
94
  double val_real() { return (double) val_int(); }
95
 
  type::Decimal *val_decimal(type::Decimal *decimal_value)
 
95
  my_decimal *val_decimal(my_decimal *decimal_value)
96
96
  {
97
97
    assert(fixed == 1);
98
98
    return  val_decimal_from_date(decimal_value);