~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cache.cc

  • Committer: Brian Aker
  • Date: 2010-10-28 17:12:01 UTC
  • mfrom: (1887.1.3 merge)
  • Revision ID: brian@tangent.org-20101028171201-baj6l1bnntn1s4ad
Merge in POTFILES changes.

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
19
19
 
20
20
#include "config.h"
21
21
 
22
 
#include <drizzled/field.h>
23
22
#include <drizzled/item/cache.h>
24
 
#include <drizzled/item/cache_decimal.h>
 
23
#include <drizzled/item/cache_row.h>
25
24
#include <drizzled/item/cache_int.h>
26
25
#include <drizzled/item/cache_real.h>
27
 
#include <drizzled/item/cache_row.h>
 
26
#include <drizzled/item/cache_decimal.h>
28
27
#include <drizzled/item/cache_str.h>
29
 
#include <drizzled/lex_string.h>
30
28
 
31
29
namespace drizzled
32
30
{
36
34
  switch (item->result_type()) {
37
35
  case INT_RESULT:
38
36
    return new Item_cache_int();
39
 
 
40
37
  case REAL_RESULT:
41
38
    return new Item_cache_real();
42
 
 
43
39
  case DECIMAL_RESULT:
44
40
    return new Item_cache_decimal();
45
 
 
46
41
  case STRING_RESULT:
47
42
    return new Item_cache_str(item);
48
 
 
49
43
  case ROW_RESULT:
50
44
    return new Item_cache_row();
 
45
  default:
 
46
    // should never be in real life
 
47
    assert(0);
 
48
    return 0;
51
49
  }
52
 
 
53
 
  assert(0);
54
 
  abort();
55
50
}
56
51
 
57
52