~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/display.cc

  • Committer: Brian Aker
  • Date: 2010-12-31 21:25:11 UTC
  • mto: (2045.1.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2046.
  • Revision ID: brian@tangent.org-20101231212511-bhlyaw71ij4v15au
Make more time usage private.

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>
22
 
 
23
 
#include <drizzled/display.h>
24
 
#include <drizzled/item.h>
25
 
 
26
 
#include <cassert>
27
 
#include <iostream>
28
 
#include <sstream>
 
21
#include "config.h"
 
22
 
 
23
#include "drizzled/display.h"
 
24
#include "drizzled/item.h"
 
25
 
 
26
#include <assert.h>
29
27
 
30
28
namespace drizzled {
31
29
namespace display {
45
43
static const std::string DRIZZLE_TYPE_DOUBLE("DRIZZLE_TYPE_DOUBLE"); 
46
44
static const std::string DRIZZLE_TYPE_NULL("DRIZZLE_TYPE_NULL"); 
47
45
static const std::string DRIZZLE_TYPE_TIMESTAMP("DRIZZLE_TYPE_TIMESTAMP"); 
48
 
static const std::string DRIZZLE_TYPE_MICROTIME("DRIZZLE_TYPE_MICROTIME"); 
49
46
static const std::string DRIZZLE_TYPE_LONGLONG("DRIZZLE_TYPE_LONGLONG"); 
50
47
static const std::string DRIZZLE_TYPE_DATETIME("DRIZZLE_TYPE_DATETIME"); 
51
48
static const std::string DRIZZLE_TYPE_TIME("DRIZZLE_TYPE_TIME"); 
92
89
static const std::string ITEM_CAST_CHAR("ITEM_CAST_CHAR");
93
90
static const std::string ITEM_CAST_DECIMAL("ITEM_CAST_DECIMAL");
94
91
 
95
 
static const std::string STRING_RESULT_STRING("STRING");
96
 
static const std::string REAL_RESULT_STRING("REAL");
97
 
static const std::string INT_RESULT_STRING("INTEGER");
98
 
static const std::string ROW_RESULT_STRING("ROW");
99
 
static const std::string DECIMAL_RESULT_STRING("DECIMAL");
100
 
 
101
92
static const std::string YES("YES");
102
93
static const std::string NO("NO");
103
94
 
212
203
  return PROGRAM_ERROR;
213
204
}
214
205
 
215
 
const std::string &type(Item_result type)
216
 
{
217
 
  switch (type)
218
 
  {
219
 
  case STRING_RESULT:
220
 
    return STRING_RESULT_STRING;
221
 
  case REAL_RESULT:
222
 
    return REAL_RESULT_STRING;
223
 
  case INT_RESULT:
224
 
    return INT_RESULT_STRING;
225
 
  case ROW_RESULT:
226
 
    return ROW_RESULT_STRING;
227
 
  case DECIMAL_RESULT:
228
 
    return DECIMAL_RESULT_STRING;
229
 
  }
230
 
 
231
 
  assert(0);
232
 
  return PROGRAM_ERROR;
233
 
}
234
206
 
235
207
const std::string &type(drizzled::enum_field_types type)
236
208
{
242
214
    return DRIZZLE_TYPE_DOUBLE;
243
215
  case drizzled::DRIZZLE_TYPE_NULL : 
244
216
    return DRIZZLE_TYPE_NULL;
245
 
  case drizzled::DRIZZLE_TYPE_MICROTIME : 
246
 
    return DRIZZLE_TYPE_MICROTIME;
247
217
  case drizzled::DRIZZLE_TYPE_TIMESTAMP : 
248
218
    return DRIZZLE_TYPE_TIMESTAMP;
249
219
  case drizzled::DRIZZLE_TYPE_LONGLONG :