~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Tim Penhey
  • Date: 2010-01-20 02:39:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1275.
  • Revision ID: tim.penhey@canonical.com-20100120023901-8teeunid6gwlthzx
Add in a rot 13 function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
21
 
 
 
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 */