taco-db  0.1.0
IndexColumn.h
Go to the documentation of this file.
1 
7 #ifndef CATALOG_SYSTABLES_IndexColumn_H
8 #define CATALOG_SYSTABLES_IndexColumn_H
9 
10 namespace taco {
11 
17 public:
18 
22  constexpr Oid
23  idxcolidxid() const {
24  return m_idxcolidxid;
25  }
26 
30  constexpr int16_t
31  idxcolid() const {
32  return m_idxcolid;
33  }
34 
38  constexpr int16_t
39  idxcoltabcolid() const {
40  return m_idxcoltabcolid;
41  }
42 
46  constexpr Oid
47  idxcoltypid() const {
48  return m_idxcoltypid;
49  }
50 
54  constexpr bool
55  idxcolisnullable() const {
56  return m_idxcolisnullable;
57  }
58 
62  constexpr uint64_t
63  idxcoltypparam() const {
64  return m_idxcoltypparam;
65  }
66 
70  constexpr Oid
71  idxcoleqfuncid() const {
72  return m_idxcoleqfuncid;
73  }
74 
78  constexpr Oid
79  idxcolltfuncid() const {
80  return m_idxcolltfuncid;
81  }
82 
83 
84 
85 private:
88  int16_t idxcolid,
89  int16_t idxcoltabcolid,
91  bool idxcolisnullable,
92  uint64_t idxcoltypparam,
95 
96  ):
105 {}
106 
108  int16_t m_idxcolid;
115 
122  std::vector<Datum> GetDatumVector() const;
123 
129  static SysTable_IndexColumn *Create(const std::vector<Datum>&);
130 
133 
134  friend class BootstrapCatCache;
136 
137 public:
138  // The following are constants of the field ids in the systables.
139  // These are mostly used by the catalog cache impl. to prevent accidental
140  // misspelling of column names.
141 
142  inline static constexpr FieldId
144  return 0;
145  }
146 
147  inline static constexpr FieldId
149  return 1;
150  }
151 
152  inline static constexpr FieldId
154  return 2;
155  }
156 
157  inline static constexpr FieldId
159  return 3;
160  }
161 
162  inline static constexpr FieldId
164  return 4;
165  }
166 
167  inline static constexpr FieldId
169  return 5;
170  }
171 
172  inline static constexpr FieldId
174  return 6;
175  }
176 
177  inline static constexpr FieldId
179  return 7;
180  }
181 
182 
183 };
184 
185 } // namespace taco
186 
187 #endif // CATALOG_SYSTABLES_IndexColumn_H
188 
BootstrapCatCache stores hard-coded data needed to bootstrap the entire database catalog.
Definition: BootstrapCatCache.h:21
Some internal functions of catalog cache implementations.
Definition: CatCacheBase.h:38
SysTable_IndexColumn is an in-memory cached record in the system catalog SysTable_IndexColumn.
Definition: IndexColumn.h:16
SysTable_IndexColumn & operator=(const SysTable_IndexColumn &)=default
constexpr Oid idxcolidxid() const
Returns the index ID.
Definition: IndexColumn.h:23
constexpr int16_t idxcolid() const
Returns the key column number in the index (counting from 0).
Definition: IndexColumn.h:31
Oid m_idxcolltfuncid
Definition: IndexColumn.h:114
uint64_t m_idxcoltypparam
Definition: IndexColumn.h:112
int16_t m_idxcolid
Definition: IndexColumn.h:108
Oid m_idxcoltypid
Definition: IndexColumn.h:110
static SysTable_IndexColumn * Create(const std::vector< Datum > &)
Creates a new SysTable_IndexColumn with a data vector read from some record payload.
Definition: IndexColumn.cpp:17
static constexpr FieldId idxcolltfuncid_colid()
Definition: IndexColumn.h:178
constexpr Oid idxcolltfuncid() const
Returns the < operator function id.
Definition: IndexColumn.h:79
constexpr Oid idxcoleqfuncid() const
Returns the = operator function id.
Definition: IndexColumn.h:71
static constexpr FieldId idxcoltabcolid_colid()
Definition: IndexColumn.h:153
SysTable_IndexColumn(const SysTable_IndexColumn &)=default
constexpr bool idxcolisnullable() const
Returns whether this key column can be NULL.
Definition: IndexColumn.h:55
static constexpr FieldId idxcolidxid_colid()
Definition: IndexColumn.h:143
static constexpr FieldId idxcoleqfuncid_colid()
Definition: IndexColumn.h:173
SysTable_IndexColumn(Oid idxcolidxid, int16_t idxcolid, int16_t idxcoltabcolid, Oid idxcoltypid, bool idxcolisnullable, uint64_t idxcoltypparam, Oid idxcoleqfuncid, Oid idxcolltfuncid)
Definition: IndexColumn.h:86
static constexpr FieldId idxcoltypid_colid()
Definition: IndexColumn.h:158
std::vector< Datum > GetDatumVector() const
Returns all the fields as a datum vector.
Definition: IndexColumn.cpp:41
constexpr int16_t idxcoltabcolid() const
Returns the column number in the indexed table.
Definition: IndexColumn.h:39
bool m_idxcolisnullable
Definition: IndexColumn.h:111
Oid m_idxcoleqfuncid
Definition: IndexColumn.h:113
static constexpr FieldId idxcoltypparam_colid()
Definition: IndexColumn.h:168
constexpr uint64_t idxcoltypparam() const
Returns the type parameter of this key column.
Definition: IndexColumn.h:63
Oid m_idxcolidxid
Definition: IndexColumn.h:107
constexpr Oid idxcoltypid() const
Returns the type id of the key column in the index.
Definition: IndexColumn.h:47
int16_t m_idxcoltabcolid
Definition: IndexColumn.h:109
static constexpr FieldId idxcolisnullable_colid()
Definition: IndexColumn.h:163
static constexpr FieldId idxcolid_colid()
Definition: IndexColumn.h:148
Definition: datum.h:28
uint32_t Oid
Definition: tdb_base.h:210
int16_t FieldId
Definition: tdb_base.h:212