![]() |
mutable
A Database System for Research and Fast Prototyping
|
Abstract Decorator class that concrete TableDecorator inherit from. More...
#include <Schema.hpp>
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 | |
TableDecorator (std::unique_ptr< Table > table) | |
virtual | ~TableDecorator ()=default |
virtual size_t | num_attrs () const override |
Returns the number of attributes in this table. | |
virtual size_t | num_hidden_attrs () const override |
virtual size_t | num_all_attrs () const override |
virtual iterator | begin () const override |
virtual iterator | end () const override |
virtual iterator | cbegin () const override |
virtual iterator | cend () const override |
virtual hidden_iterator | begin_hidden () const override |
virtual hidden_iterator | end_hidden () const override |
virtual hidden_iterator | cbegin_hidden () const override |
virtual hidden_iterator | cend_hidden () const override |
virtual all_iterator | begin_all () const override |
virtual all_iterator | end_all () const override |
virtual all_iterator | cbegin_all () const override |
virtual all_iterator | cend_all () const override |
virtual Attribute & | at (std::size_t id) override |
Returns the attribute with the given id . | |
virtual const Attribute & | at (std::size_t id) const override |
virtual Attribute & | operator[] (std::size_t id) override |
Returns the attribute with the given id . | |
virtual const Attribute & | operator[] (std::size_t id) const override |
virtual Attribute & | at (const ThreadSafePooledString &name) override |
Returns the attribute with the given name . | |
virtual const Attribute & | at (const ThreadSafePooledString &name) const override |
virtual Attribute & | operator[] (const ThreadSafePooledString &name) override |
Returns the attribute with the given name . | |
virtual const Attribute & | operator[] (const ThreadSafePooledString &name) const override |
virtual bool | has_attribute (const ThreadSafePooledString &name) const override |
Returns true iff the table has an attribute name . | |
virtual bool | operator== (const Table &other) override |
Returns true iff the Table other is the same as this , false otherwise. | |
virtual bool | operator== (const Table &other) const override |
virtual const ThreadSafePooledString & | name () const override |
Returns the name of the Table. | |
virtual Store & | store () const override |
Returns a reference to the backing store. | |
virtual void | store (std::unique_ptr< Store > new_store) override |
Sets the backing store for this table. | |
virtual const storage::DataLayout & | layout () const override |
Returns a reference to the physical data layout. | |
virtual void | layout (storage::DataLayout &&new_layout) override |
Sets the physical data layout for this table. | |
virtual void | layout (const storage::DataLayoutFactory &factory) override |
Sets the physical data layout for this table by calling factory.make() . | |
virtual std::vector< std::reference_wrapper< const Attribute > > | primary_key () const override |
Returns all attributes forming the primary key. | |
virtual void | add_primary_key (const ThreadSafePooledString &name) override |
Adds an attribute with the given name to the primary key of this table. | |
virtual void | push_back (ThreadSafePooledString name, const PrimitiveType *type) override |
Adds a new attribute with the given name and type to the table. | |
virtual Schema | schema (const ThreadSafePooledOptionalString &alias) const override |
Returns a Schema for this Table given the alias alias . | |
virtual size_t | convert_id (size_t id) override |
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 override |
virtual void | dump () const override |
Protected Types | |
using | table_type = std::vector< Attribute > |
Protected Attributes | |
std::unique_ptr< Table > | table_ |
Abstract Decorator class that concrete TableDecorator inherit from.
Definition at line 747 of file Schema.hpp.
|
inherited |
Definition at line 524 of file Schema.hpp.
|
inherited |
Definition at line 523 of file Schema.hpp.
|
inherited |
Definition at line 522 of file Schema.hpp.
|
protectedinherited |
Definition at line 390 of file Schema.hpp.
|
inline |
Definition at line 753 of file Schema.hpp.
|
virtualdefault |
|
inlineoverridevirtual |
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.
Implements m::Table.
Definition at line 802 of file Schema.hpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the attribute with the given name
.
Throws std::out_of_range
if no attribute with the given name
exists.
Implements m::Table.
Definition at line 781 of file Schema.hpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the attribute with the given id
.
Throws std::out_of_range
if no attribute with the given id
exists.
Implements m::Table.
Definition at line 775 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Converts the id
an non-hidden attribute would have in a table without any hidden attributes and returns the actual id of that attribute.
Implements m::Table.
Definition at line 808 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Implements m::Table.
Reimplemented in m::MultiVersioningTable.
Definition at line 811 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Implements m::Table.
Reimplemented in m::MultiVersioningTable.
Definition at line 810 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns true
iff the table has an attribute name
.
Implements m::Table.
Definition at line 787 of file Schema.hpp.
|
inlineoverridevirtual |
Returns a reference to the physical data layout.
Implements m::Table.
Definition at line 797 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Sets the physical data layout for this table by calling factory.make()
.
Implements m::Table.
Definition at line 799 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Sets the physical data layout for this table.
Implements m::Table.
Definition at line 798 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Returns the name of the Table.
Implements m::Table.
Definition at line 792 of file Schema.hpp.
References table_.
Referenced by add_primary_key(), at(), has_attribute(), operator[](), and push_back().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the number of attributes in this table.
Implements m::Table.
Definition at line 756 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements m::Table.
Definition at line 790 of file Schema.hpp.
|
inlineoverridevirtual |
Returns true
iff the Table
other
is the same as this
, false
otherwise.
Implements m::Table.
Definition at line 789 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the attribute with the given name
.
Implements m::Table.
Definition at line 784 of file Schema.hpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the attribute with the given id
.
Implements m::Table.
Definition at line 778 of file Schema.hpp.
|
inlineoverridevirtual |
Returns all attributes forming the primary key.
Implements m::Table.
Definition at line 801 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Adds a new attribute with the given name
and type
to the table.
Throws std::invalid_argument
if the name
is already in use.
Implements m::Table.
Definition at line 804 of file Schema.hpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns a reference to the backing store.
Implements m::Table.
Definition at line 794 of file Schema.hpp.
References table_.
|
inlineoverridevirtual |
Sets the backing store for this table.
new_store
must not be nullptr
.
Implements m::Table.
Definition at line 795 of file Schema.hpp.
References table_.
|
protected |
Definition at line 750 of file Schema.hpp.
Referenced by add_primary_key(), at(), begin(), begin_all(), begin_hidden(), cbegin(), cbegin_all(), cbegin_hidden(), cend(), cend_all(), cend_hidden(), convert_id(), dump(), m::MultiVersioningTable::dump(), end(), end_all(), end_hidden(), has_attribute(), layout(), m::MultiVersioningTable::MultiVersioningTable(), name(), num_all_attrs(), num_attrs(), num_hidden_attrs(), operator==(), operator[](), primary_key(), push_back(), schema(), and store().