~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/key_field.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef DRIZZLED_OPTIMIZER_KEY_FIELD_H
21
21
#define DRIZZLED_OPTIMIZER_KEY_FIELD_H
22
22
 
 
23
#include <drizzled/server_includes.h>
23
24
#include <drizzled/sql_select.h>
24
25
 
25
26
#include <vector>
47
48
      cond_guard(NULL)
48
49
  {}
49
50
 
50
 
  KeyField(Field *in_field,
51
 
           Item *in_val,
52
 
           uint32_t in_level,
53
 
           uint32_t in_optimize,
54
 
           bool in_eq_func,
55
 
           bool in_null_rejecting,
56
 
           bool *in_cond_guard)
57
 
    :
58
 
      field(in_field),
59
 
      val(in_val),
60
 
      level(in_level),
61
 
      optimize(in_optimize),
62
 
      eq_func(in_eq_func),
63
 
      null_rejecting(in_null_rejecting),
64
 
      cond_guard(in_cond_guard)
65
 
  {}
66
 
 
67
 
  Field *getField()
68
 
  {
69
 
    return field;
70
 
  }
71
 
 
72
 
  void setField(Field *in_field)
73
 
  {
74
 
    field= in_field;
75
 
  }
76
 
 
77
 
  Item *getValue()
78
 
  {
79
 
    return val;
80
 
  }
81
 
 
82
 
  void setValue(Item *in_val)
83
 
  {
84
 
    val= in_val;
85
 
  }
86
 
 
87
 
  uint32_t getLevel()
88
 
  {
89
 
    return level;
90
 
  }
91
 
 
92
 
  void setLevel(uint32_t in_level)
93
 
  {
94
 
    level= in_level;
95
 
  }
96
 
 
97
 
  uint32_t getOptimizeFlags()
98
 
  {
99
 
    return optimize;
100
 
  }
101
 
 
102
 
  void setOptimizeFlags(uint32_t in_opt)
103
 
  {
104
 
    optimize= in_opt;
105
 
  }
106
 
 
107
 
  bool isEqualityCondition() const
108
 
  {
109
 
    return eq_func;
110
 
  }
111
 
 
112
 
  void setEqualityConditionUsed(bool in_val)
113
 
  {
114
 
    eq_func= in_val;
115
 
  }
116
 
 
117
 
  bool rejectNullValues() const
118
 
  {
119
 
    return null_rejecting;
120
 
  }
121
 
 
122
 
  void setRejectNullValues(bool in_val)
123
 
  {
124
 
    null_rejecting= in_val;
125
 
  }
126
 
 
127
 
  bool *getConditionalGuard()
128
 
  {
129
 
    return cond_guard;
130
 
  }
131
 
 
132
 
  void setConditionalGuard(bool *in_cond_guard)
133
 
  {
134
 
    cond_guard= in_cond_guard;
135
 
  }
136
 
 
137
 
private:
138
 
 
139
51
  Field *field;
140
52
  Item *val; /**< May be empty if diff constant */
141
53
  uint32_t level;
147
59
  */
148
60
  bool null_rejecting;
149
61
  bool *cond_guard; /**< @see KeyUse::cond_guard */
150
 
 
151
62
};
152
63
 
153
64
void add_key_fields(JOIN *join,