~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Patrick Galbraith
  • Date: 2009-10-08 22:42:05 UTC
  • mto: (1166.5.3 memcached_functions)
  • mto: This revision was merged to the branch mainline in revision 1189.
  • Revision ID: patg@patrick-galbraiths-macbook-pro.local-20091008224205-gq1pehjsivvx0qo9
Starting over with a fresh tree, moved in memcached functions.

Memcached Functions for Drizzle. 

All tests pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
21
 
 
 
20
#include "drizzled/server_includes.h"
 
21
#include CSTDINT_H
22
22
#include "drizzled/function/time/date.h"
23
23
#include "drizzled/temporal.h"
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
String *Item_date::val_str(String *str)
29
26
{
30
27
  assert(fixed);
31
28
 
32
29
  /* We have our subclass convert a Date temporal for us */
33
 
  Date temporal;
 
30
  drizzled::Date temporal;
34
31
  if (! get_temporal(temporal))
35
32
    return (String *) NULL; /* get_temporal throws error. */
36
33
 
53
50
  assert(fixed);
54
51
 
55
52
  /* We have our subclass convert a Date temporal for us */
56
 
  Date temporal;
 
53
  drizzled::Date temporal;
57
54
  if (! get_temporal(temporal))
58
55
    return 0; /* get_temporal throws error. */
59
56
 
62
59
  temporal.to_int32_t(&int_value);
63
60
  return (int64_t) int_value;
64
61
}
65
 
 
66
 
} /* namespace drizzled */