![]() |
mutable
A Database System for Research and Fast Prototyping
|
A table is a sorted set of attributes. More...
#include <Schema.hpp>
Data Structures | |
struct | the_iterator |
Public Types | |
using | iterator = the_iterator< true, false > |
using | hidden_iterator = the_iterator< false, true > |
using | all_iterator = the_iterator< true, true > |
Public Member Functions | |
virtual | ~Table ()=default |
virtual std::size_t | num_attrs () const =0 |
Returns the number of attributes in this table. | |
virtual std::size_t | num_hidden_attrs () const =0 |
virtual std::size_t | num_all_attrs () const =0 |
virtual iterator | begin () const =0 |
virtual iterator | end () const =0 |
virtual iterator | cbegin () const =0 |
virtual iterator | cend () const =0 |
virtual hidden_iterator | begin_hidden () const =0 |
virtual hidden_iterator | end_hidden () const =0 |
virtual hidden_iterator | cbegin_hidden () const =0 |
virtual hidden_iterator | cend_hidden () const =0 |
virtual all_iterator | begin_all () const =0 |
virtual all_iterator | end_all () const =0 |
virtual all_iterator | cbegin_all () const =0 |
virtual all_iterator | cend_all () const =0 |
virtual Attribute & | at (std::size_t id)=0 |
Returns the attribute with the given id . | |
virtual const Attribute & | at (std::size_t id) const =0 |
virtual Attribute & | operator[] (std::size_t id)=0 |
Returns the attribute with the given id . | |
virtual const Attribute & | operator[] (std::size_t id) const =0 |
virtual Attribute & | at (const ThreadSafePooledString &name)=0 |
Returns the attribute with the given name . | |
virtual const Attribute & | at (const ThreadSafePooledString &name) const =0 |
virtual Attribute & | operator[] (const ThreadSafePooledString &name)=0 |
Returns the attribute with the given name . | |
virtual const Attribute & | operator[] (const ThreadSafePooledString &name) const =0 |
virtual bool | has_attribute (const ThreadSafePooledString &name) const =0 |
Returns true iff the table has an attribute name . | |
virtual bool | operator== (const Table &other)=0 |
Returns true iff the Table other is the same as this , false otherwise. | |
virtual bool | operator== (const Table &other) const =0 |
virtual const ThreadSafePooledString & | name () const =0 |
Returns the name of the Table. | |
virtual Store & | store () const =0 |
Returns a reference to the backing store. | |
virtual void | store (std::unique_ptr< Store > new_store)=0 |
Sets the backing store for this table. | |
virtual const storage::DataLayout & | layout () const =0 |
Returns a reference to the physical data layout. | |
virtual void | layout (storage::DataLayout &&new_layout)=0 |
Sets the physical data layout for this table. | |
virtual void | layout (const storage::DataLayoutFactory &factory)=0 |
Sets the physical data layout for this table by calling factory.make() . | |
virtual std::vector< std::reference_wrapper< const Attribute > > | primary_key () const =0 |
Returns all attributes forming the primary key. | |
virtual void | add_primary_key (const ThreadSafePooledString &name)=0 |
Adds an attribute with the given name to the primary key of this table. | |
virtual void | push_back (ThreadSafePooledString name, const PrimitiveType *type)=0 |
Adds a new attribute with the given name and type to the table. | |
virtual Schema | schema (const ThreadSafePooledOptionalString &alias={}) const =0 |
Returns a Schema for this Table given the alias alias . | |
virtual size_t | convert_id (size_t id)=0 |
Converts the id an non-hidden attribute would have in a table without any hidden attributes and returns the actual id of that attribute. | |
virtual void | dump (std::ostream &out) const =0 |
virtual void | dump () const =0 |
Protected Types | |
using | table_type = std::vector< Attribute > |
A table is a sorted set of attributes.
Definition at line 387 of file Schema.hpp.
using m::Table::all_iterator = the_iterator<true, true> |
Definition at line 524 of file Schema.hpp.
using m::Table::hidden_iterator = the_iterator<false, true> |
Definition at line 523 of file Schema.hpp.
using m::Table::iterator = the_iterator<true, false> |
Definition at line 522 of file Schema.hpp.
|
protected |
Definition at line 390 of file Schema.hpp.
|
virtualdefault |
|
pure virtual |
Adds an attribute with the given name
to the primary key of this table.
Throws std::out_of_range
if no attribute with the given name
exists.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns the attribute with the given name
.
Throws std::out_of_range
if no attribute with the given name
exists.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns the attribute with the given id
.
Throws std::out_of_range
if no attribute with the given id
exists.
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::Database::get_table(), and m::DSVReader::operator()().
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::ColumnStore::ColumnStore(), and m::DSVReader::operator()().
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::DSVReader::operator()().
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Converts the id
an non-hidden attribute would have in a table without any hidden attributes and returns the actual id of that attribute.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, m::TableDecorator, and m::MultiVersioningTable.
|
pure virtual |
Implemented in m::ConcreteTable, m::TableDecorator, and m::MultiVersioningTable.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::ColumnStore::ColumnStore(), and m::DSVReader::operator()().
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::DSVReader::operator()().
|
pure virtual |
Returns true
iff the table has an attribute name
.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns a reference to the physical data layout.
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::CreateTable::execute(), m::WasmEngine::WasmContext::map_table(), and m::DSVReader::operator()().
|
pure virtual |
Sets the physical data layout for this table by calling factory.make()
.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Sets the physical data layout for this table.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns the name of the Table.
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::idx::IndexBase::build_query(), m::ColumnStore::dump(), m::PaxStore::dump(), m::RowStore::dump(), m::CreateTable::execute(), m::BaseTable::name(), std::hash< m::Attribute >::operator()(), and m::DSVReader::operator()().
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns the number of attributes in this table.
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::ColumnStore::ColumnStore(), m::PaxStore::compute_block_offsets(), and m::RowStore::compute_offsets().
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns true
iff the Table
other
is the same as this
, false
otherwise.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns the attribute with the given name
.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns the attribute with the given id
.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Returns all attributes forming the primary key.
Implemented in m::ConcreteTable, and m::TableDecorator.
|
pure virtual |
Adds a new attribute with the given name
and type
to the table.
Throws std::invalid_argument
if the name
is already in use.
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by generate_training_suite_filter(), generate_training_suite_group_by(), and generate_training_suite_join().
|
pure virtual |
Returns a Schema
for this Table
given the alias alias
.
Implemented in m::TableDecorator.
Referenced by m::ScanOperator::ScanOperator().
|
pure virtual |
Returns a reference to the backing store.
Implemented in m::ConcreteTable, and m::TableDecorator.
Referenced by m::CreateTable::execute(), m::WasmEngine::WasmContext::map_table(), and m::DSVReader::operator()().
|
pure virtual |
Sets the backing store for this table.
new_store
must not be nullptr
.
Implemented in m::ConcreteTable, and m::TableDecorator.