~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_func.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    Allowed numbers of columns in result (usually 1, which means scalar value)
42
42
    0 means get this number from first argument
43
43
  */
44
 
  uint allowed_arg_cols;
 
44
  uint32_t allowed_arg_cols;
45
45
public:
46
 
  uint arg_count;
 
46
  uint32_t arg_count;
47
47
  table_map used_tables_cache, not_null_tables_cache;
48
48
  bool const_item_cache;
49
49
  enum Functype { UNKNOWN_FUNC,EQ_FUNC,EQUAL_FUNC,NE_FUNC,LT_FUNC,LE_FUNC,
140
140
  virtual bool const_item() const { return const_item_cache; }
141
141
  inline Item **arguments() const { return args; }
142
142
  void set_arguments(List<Item> &list);
143
 
  inline uint argument_count() const { return arg_count; }
 
143
  inline uint32_t argument_count() const { return arg_count; }
144
144
  inline void remove_arguments() { arg_count=0; }
145
145
  void split_sum_func(THD *thd, Item **ref_pointer_array, List<Item> &fields);
146
146
  virtual void print(String *str, enum_query_type query_type);
147
147
  void print_op(String *str, enum_query_type query_type);
148
 
  void print_args(String *str, uint from, enum_query_type query_type);
 
148
  void print_args(String *str, uint32_t from, enum_query_type query_type);
149
149
  virtual void fix_num_length_and_dec();
150
150
  void count_only_length();
151
151
  void count_real_length();
152
152
  void count_decimal_length();
153
 
  inline bool get_arg0_date(DRIZZLE_TIME *ltime, uint fuzzy_date)
 
153
  inline bool get_arg0_date(DRIZZLE_TIME *ltime, uint32_t fuzzy_date)
154
154
  {
155
155
    return (null_value=args[0]->get_date(ltime, fuzzy_date));
156
156
  }
170
170
 
171
171
  my_decimal *val_decimal(my_decimal *);
172
172
 
173
 
  bool agg_arg_collations(DTCollation &c, Item **items, uint nitems,
174
 
                          uint flags)
 
173
  bool agg_arg_collations(DTCollation &c, Item **items, uint32_t nitems,
 
174
                          uint32_t flags)
175
175
  {
176
176
    return agg_item_collations(c, func_name(), items, nitems, flags, 1);
177
177
  }
178
178
  bool agg_arg_collations_for_comparison(DTCollation &c,
179
 
                                         Item **items, uint nitems,
180
 
                                         uint flags)
 
179
                                         Item **items, uint32_t nitems,
 
180
                                         uint32_t flags)
181
181
  {
182
182
    return agg_item_collations_for_comparison(c, func_name(),
183
183
                                              items, nitems, flags);
184
184
  }
185
 
  bool agg_arg_charsets(DTCollation &c, Item **items, uint nitems,
186
 
                        uint flags, int item_sep)
 
185
  bool agg_arg_charsets(DTCollation &c, Item **items, uint32_t nitems,
 
186
                        uint32_t flags, int item_sep)
187
187
  {
188
188
    return agg_item_charsets(c, func_name(), items, nitems, flags, item_sep);
189
189
  }
354
354
  void fix_length_and_dec()
355
355
  { max_length=args[0]->max_length; unsigned_flag=0; }
356
356
  virtual void print(String *str, enum_query_type query_type);
357
 
  uint decimal_precision() const { return args[0]->decimal_precision(); }
 
357
  uint32_t decimal_precision() const { return args[0]->decimal_precision(); }
358
358
};
359
359
 
360
360
 
436
436
class Item_func_div :public Item_num_op
437
437
{
438
438
public:
439
 
  uint prec_increment;
 
439
  uint32_t prec_increment;
440
440
  Item_func_div(Item *a,Item *b) :Item_num_op(a,b) {}
441
441
  int64_t int_op() { assert(0); return 0; }
442
442
  double real_op();
488
488
  enum Functype functype() const   { return NEG_FUNC; }
489
489
  void fix_length_and_dec();
490
490
  void fix_num_length_and_dec();
491
 
  uint decimal_precision() const { return args[0]->decimal_precision(); }
 
491
  uint32_t decimal_precision() const { return args[0]->decimal_precision(); }
492
492
};
493
493
 
494
494
 
746
746
  void fix_length_and_dec();
747
747
  enum Item_result result_type () const { return cmp_type; }
748
748
  bool result_as_int64_t() { return compare_as_dates; };
749
 
  uint cmp_datetimes(uint64_t *value);
 
749
  uint32_t cmp_datetimes(uint64_t *value);
750
750
  enum_field_types field_type() const { return cached_field_type; }
751
751
};
752
752
 
884
884
class Item_func_find_in_set :public Item_int_func
885
885
{
886
886
  String value,value2;
887
 
  uint enum_value;
 
887
  uint32_t enum_value;
888
888
  uint64_t enum_bit;
889
889
  DTCollation cmp_collation;
890
890
public:
1040
1040
  int64_t val_int_result();
1041
1041
  String *str_result(String *str);
1042
1042
  my_decimal *val_decimal_result(my_decimal *);
1043
 
  bool update_hash(void *ptr, uint length, enum Item_result type,
 
1043
  bool update_hash(void *ptr, uint32_t length, enum Item_result type,
1044
1044
                   const CHARSET_INFO * const cs, Derivation dv, bool unsigned_arg);
1045
1045
  bool send(Protocol *protocol, String *str_arg);
1046
1046
  void make_field(Send_field *tmp_field);
1118
1118
  bool fix_fields(THD *thd, Item **ref);
1119
1119
  virtual void print(String *str, enum_query_type query_type);
1120
1120
  void set_null_value(const CHARSET_INFO * const cs);
1121
 
  void set_value(const char *str, uint length, const CHARSET_INFO * const cs);
 
1121
  void set_value(const char *str, uint32_t length, const CHARSET_INFO * const cs);
1122
1122
};
1123
1123
 
1124
1124