~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/copy_string.h

  • Committer: Monty Taylor
  • Date: 2009-03-06 03:33:24 UTC
  • mfrom: (916.1.2 merge)
  • Revision ID: mordred@inaugust.com-20090306033324-dcedf80g9qzywbvu
Merged Brian's merge... re-rotate the tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/item/ident.h>
24
24
#include <drizzled/item/field.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
 
29
26
class Item_copy_string :public Item
30
27
{
31
28
  enum enum_field_types cached_field_type;
59
56
  }
60
57
  String *val_str(String*);
61
58
  my_decimal *val_decimal(my_decimal *);
62
 
  void make_field(SendField *field) { item->make_field(field); }
 
59
  void make_field(Send_field *field) { item->make_field(field); }
63
60
  void copy();
64
61
  int save_in_field(Field *field, bool)
65
62
  {
70
67
  bool is_null() { return null_value; }
71
68
};
72
69
 
73
 
} /* namespace drizzled */
 
70
 
 
71
class Item_default_value : public Item_field
 
72
{
 
73
public:
 
74
  Item *arg;
 
75
  Item_default_value(Name_resolution_context *context_arg)
 
76
    :Item_field(context_arg, (const char *)NULL, (const char *)NULL,
 
77
               (const char *)NULL),
 
78
     arg(NULL) {}
 
79
  Item_default_value(Name_resolution_context *context_arg, Item *a)
 
80
    :Item_field(context_arg, (const char *)NULL, (const char *)NULL,
 
81
                (const char *)NULL),
 
82
     arg(a) {}
 
83
  enum Type type() const { return DEFAULT_VALUE_ITEM; }
 
84
  bool eq(const Item *item, bool binary_cmp) const;
 
85
  bool fix_fields(Session *, Item **);
 
86
  virtual void print(String *str, enum_query_type query_type);
 
87
  int save_in_field(Field *field_arg, bool no_conversions);
 
88
  table_map used_tables() const { return (table_map)0L; }
 
89
 
 
90
  bool walk(Item_processor processor, bool walk_subquery, unsigned char *args)
 
91
  {
 
92
    return arg->walk(processor, walk_subquery, args) ||
 
93
      (this->*processor)(args);
 
94
  }
 
95
 
 
96
  Item *transform(Item_transformer transformer, unsigned char *args);
 
97
};
74
98
 
75
99
#endif /* DRIZZLED_ITEM_COPY_STRING_H */