taco-db  0.1.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
taco::BootstrapCatCache Class Reference

BootstrapCatCache stores hard-coded data needed to bootstrap the entire database catalog. More...

#include <catalog/BootstrapCatCache.h>

Public Member Functions

 BootstrapCatCache ()
 Initializes the data in the bootstrap systables. More...
 
 ~BootstrapCatCache ()
 
void Init ()
 Finishes the initialization of the bootstrap catalog cache. More...
 
const SysTable_TableFindTable (Oid oid)
 
const SysTable_TypeFindType (Oid oid)
 
std::vector< const SysTable_Column * > FindColumns (Oid tabid)
 
const TableDescFindTableDesc (Oid oid)
 
const SysTable_FunctionFindFunction (Oid oid)
 

Private Member Functions

void CreateTableDesc (const std::vector< const SysTable_Column * > &columns)
 Creates a TableDesc object for a systable table that consists of the `‘columns’', and insert it into this catalog. More...
 

Private Attributes

SysTable_Table m_table [num_bootstrap_tables]
 
SysTable_Type m_type [num_bootstrap_types]
 
SysTable_Column m_column [num_bootstrap_columns]
 
SysTable_Function m_function [num_bootstrap_functions]
 
absl::flat_hash_map< Oid, const SysTable_Table * > m_tabid_lookup_table
 
absl::flat_hash_map< Oid, const SysTable_Type * > m_typid_lookup_table
 
absl::flat_hash_map< Oid, const SysTable_Function * > m_funcid_lookup_table
 
std::vector< std::unique_ptr< TableDesc > > m_table_desc
 
absl::flat_hash_map< Oid, const TableDesc * > m_table_desc_lookup_table
 

Detailed Description

BootstrapCatCache stores hard-coded data needed to bootstrap the entire database catalog.

All other catelog cache will reference this class to load the data needed.

Constructor & Destructor Documentation

◆ BootstrapCatCache()

taco::BootstrapCatCache::BootstrapCatCache ( )

Initializes the data in the bootstrap systables.

Must Call BootstrapCatCache()::init() to finish initialization. The implementation of this function is in catalog/systables/bootstrap_data.cpp, which is automatically generated from the systable.

◆ ~BootstrapCatCache()

taco::BootstrapCatCache::~BootstrapCatCache ( )

Member Function Documentation

◆ CreateTableDesc()

void taco::BootstrapCatCache::CreateTableDesc ( const std::vector< const SysTable_Column * > &  columns)
private

Creates a TableDesc object for a systable table that consists of the `‘columns’', and insert it into this catalog.

◆ FindColumns()

std::vector< const SysTable_Column * > taco::BootstrapCatCache::FindColumns ( Oid  tabid)

◆ FindFunction()

const SysTable_Function * taco::BootstrapCatCache::FindFunction ( Oid  oid)

◆ FindTable()

const SysTable_Table * taco::BootstrapCatCache::FindTable ( Oid  oid)

◆ FindTableDesc()

const TableDesc * taco::BootstrapCatCache::FindTableDesc ( Oid  oid)

◆ FindType()

const SysTable_Type * taco::BootstrapCatCache::FindType ( Oid  oid)

◆ Init()

void taco::BootstrapCatCache::Init ( )

Finishes the initialization of the bootstrap catalog cache.

Never call this more than once.

Member Data Documentation

◆ m_column

SysTable_Column taco::BootstrapCatCache::m_column[num_bootstrap_columns]
private

◆ m_funcid_lookup_table

absl::flat_hash_map<Oid, const SysTable_Function*> taco::BootstrapCatCache::m_funcid_lookup_table
private

◆ m_function

SysTable_Function taco::BootstrapCatCache::m_function[num_bootstrap_functions]
private

◆ m_tabid_lookup_table

absl::flat_hash_map<Oid, const SysTable_Table*> taco::BootstrapCatCache::m_tabid_lookup_table
private

◆ m_table

SysTable_Table taco::BootstrapCatCache::m_table[num_bootstrap_tables]
private

◆ m_table_desc

std::vector<std::unique_ptr<TableDesc> > taco::BootstrapCatCache::m_table_desc
private

◆ m_table_desc_lookup_table

absl::flat_hash_map<Oid, const TableDesc *> taco::BootstrapCatCache::m_table_desc_lookup_table
private

◆ m_type

SysTable_Type taco::BootstrapCatCache::m_type[num_bootstrap_types]
private

◆ m_typid_lookup_table

absl::flat_hash_map<Oid, const SysTable_Type*> taco::BootstrapCatCache::m_typid_lookup_table
private

The documentation for this class was generated from the following files: