taco-db  0.1.0
FunctionArgs.h
Go to the documentation of this file.
1 
7 #ifndef CATALOG_SYSTABLES_FunctionArgs_H
8 #define CATALOG_SYSTABLES_FunctionArgs_H
9 
10 namespace taco {
11 
17 public:
18 
22  constexpr Oid
23  funcid() const {
24  return m_funcid;
25  }
26 
30  constexpr int16_t
31  funcargid() const {
32  return m_funcargid;
33  }
34 
38  constexpr Oid
39  funcargtypid() const {
40  return m_funcargtypid;
41  }
42 
43 
44 
45 private:
47  Oid funcid,
48  int16_t funcargid,
50 
51  ):
52  m_funcid((funcid)),
55 {}
56 
58  int16_t m_funcargid;
60 
67  std::vector<Datum> GetDatumVector() const;
68 
74  static SysTable_FunctionArgs *Create(const std::vector<Datum>&);
75 
78 
79  friend class BootstrapCatCache;
80  friend class CatCacheInternalAccess;
81 
82 public:
83  // The following are constants of the field ids in the systables.
84  // These are mostly used by the catalog cache impl. to prevent accidental
85  // misspelling of column names.
86 
87  inline static constexpr FieldId
89  return 0;
90  }
91 
92  inline static constexpr FieldId
94  return 1;
95  }
96 
97  inline static constexpr FieldId
99  return 2;
100  }
101 
102 
103 };
104 
105 } // namespace taco
106 
107 #endif // CATALOG_SYSTABLES_FunctionArgs_H
108 
taco::SysTable_FunctionArgs
SysTable_FunctionArgs is an in-memory cached record in the system catalog SysTable_FunctionArgs.
Definition: FunctionArgs.h:16
taco::SysTable_FunctionArgs::m_funcargtypid
Oid m_funcargtypid
Definition: FunctionArgs.h:59
taco::SysTable_FunctionArgs::Create
static SysTable_FunctionArgs * Create(const std::vector< Datum > &)
Creates a new SysTable_FunctionArgs with a data vector read from some record payload.
Definition: FunctionArgs.cpp:17
taco
Definition: datum.h:28
taco::SysTable_FunctionArgs::funcargtypid
constexpr Oid funcargtypid() const
Returns the argument's type id.
Definition: FunctionArgs.h:39
taco::SysTable_FunctionArgs::GetDatumVector
std::vector< Datum > GetDatumVector() const
Returns all the fields as a datum vector.
Definition: FunctionArgs.cpp:31
taco::FieldId
int16_t FieldId
Definition: tdb_base.h:213
taco::CatCacheInternalAccess
Some internal functions of catalog cache implementations.
Definition: CatCacheBase.h:38
taco::SysTable_FunctionArgs::funcargid_colid
static constexpr FieldId funcargid_colid()
Definition: FunctionArgs.h:93
taco::BootstrapCatCache
BootstrapCatCache stores hard-coded data needed to bootstrap the entire database catalog.
Definition: BootstrapCatCache.h:21
taco::SysTable_FunctionArgs::m_funcid
Oid m_funcid
Definition: FunctionArgs.h:57
taco::Oid
uint32_t Oid
Definition: tdb_base.h:211
taco::SysTable_FunctionArgs::funcid
constexpr Oid funcid() const
Returns the function ID.
Definition: FunctionArgs.h:23
taco::SysTable_FunctionArgs::funcid_colid
static constexpr FieldId funcid_colid()
Definition: FunctionArgs.h:88
taco::SysTable_FunctionArgs::operator=
SysTable_FunctionArgs & operator=(const SysTable_FunctionArgs &)=default
taco::SysTable_FunctionArgs::m_funcargid
int16_t m_funcargid
Definition: FunctionArgs.h:58
taco::SysTable_FunctionArgs::SysTable_FunctionArgs
SysTable_FunctionArgs(Oid funcid, int16_t funcargid, Oid funcargtypid)
Definition: FunctionArgs.h:46
taco::SysTable_FunctionArgs::funcargid
constexpr int16_t funcargid() const
Returns the argument ID, starts from 0.
Definition: FunctionArgs.h:31
taco::SysTable_FunctionArgs::funcargtypid_colid
static constexpr FieldId funcargtypid_colid()
Definition: FunctionArgs.h:98