Go to the documentation of this file.
4 #include <unordered_map>
14 using std::runtime_error;
16 using std::unordered_map;
23 :
msg(
"Projection " + p_name +
" not found") {}
24 virtual const char*
what()
const throw() {
return msg.c_str(); }
59 void add_column(std::string name, std::string table,
60 std::string column_name, std::string encoding,
62 void add_join_table(std::string from, std::string table, std::string to);
63 void add_join_index(std::string from, std::string other_projection,
73 throw runtime_error(
"Index out of Bounds in Projection:" +
82 " does not have column " + name);
88 std::vector<Parser::Column> result;
90 for (
auto& c :
columns) result.push_back(c);
96 std::vector<ColumnStore::Column> result;
98 for (
auto& c :
columns) result.push_back(c);
projection_column & get_column(std::string name)
Definition: Projection.h:78
DataType data_type
Definition: Projection.h:32
vector< join_index > get_join_indexes()
Definition: Projection.h:70
DataType
Different datatypes supported by this project.
Definition: Column.h:16
projection_column & operator[](int i)
Definition: Projection.h:71
std::string base_table
Definition: Projection.h:49
std::string sort_key
Definition: Projection.h:46
std::string get_sort_key()
Definition: Projection.h:67
Struct which maintains metadata of a single column.
Definition: Column.h:22
void add_join_table(std::string from, std::string table, std::string to)
Definition: Projection.cpp:11
std::string projection_name
Definition: Projection.h:45
vector< projection_column > columns
Definition: Projection.h:47
void set_projection_name(std::string projection_n)
Definition: Projection.h:54
Definition: Projection.h:44
std::string column_name
Definition: Projection.h:30
ProjectionNotFoundException(std::string &p_name)
Definition: Projection.h:22
vector< projection_column > get_columns()
Definition: Projection.h:69
unordered_map< string, int > column_map
Definition: Projection.h:48
void set_sort_key(std::string sk)
Definition: Projection.h:58
std::string get_projection_name()
Definition: Projection.h:65
Definition: Projection.h:18
std::string encoding
Definition: Projection.h:31
ColumnStore::DataRecordMetadata * get_metadata()
Definition: Projection.h:95
std::vector< Parser::Column > get_metadata_columns()
Definition: Projection.h:87
void set_base_table(std::string base_tab)
Definition: Projection.h:57
projection_column & operator[](std::string name)
Definition: Projection.h:79
std::string table
Definition: Projection.h:29
std::string get_base_table()
Definition: Projection.h:66
Definition: Projection.h:27
virtual const char * what() const
Definition: Projection.h:24
Definition: JoinIndex.h:6
void add_column(std::string name, std::string table, std::string column_name, std::string encoding, DataType data_type)
Definition: Projection.cpp:5
vector< foreign_key > join_tables
Definition: Projection.h:50
int index
Definition: Projection.h:33
vector< join_index > join_indexes
Definition: Projection.h:51
Definition: ForeignKey.h:6
vector< foreign_key > get_join_tables()
Definition: Projection.h:68
void add_join_index(std::string from, std::string other_projection, std::string to)
Definition: Projection.cpp:16
int size
Definition: Column.h:9
std::string msg
Definition: Projection.h:19
std::string name
Definition: Projection.h:28