![]() |
mutable
A Database System for Research and Fast Prototyping
|
An attribute of a table. More...
#include <Schema.hpp>
Public Member Functions | |
Attribute (const Attribute &)=delete | |
Attribute (Attribute &&)=default | |
bool | is_unique () const |
Returns true iff this Attribute is unique, i.e. | |
bool | operator== (const Attribute &other) const |
Compares to attributes. | |
bool | operator!= (const Attribute &other) const |
M_LCOV_EXCL_STOP void | dump (std::ostream &out) const |
void | dump () const |
Data Fields | |
std::size_t | id |
the internal identifier of the attribute, unique within its table | |
const Table & | table |
the table the attribute belongs to | |
const PrimitiveType * | type |
the type of the attribute | |
ThreadSafePooledString | name |
the name of the attribute | |
bool | not_nullable = false |
the flag indicating whether the attribute must not be NULL | |
bool | unique = false |
| |
bool | is_hidden = false |
the flag indicates whether the attribute is hidden from the user | |
const Attribute * | reference = nullptr |
the referenced attribute | |
Private Member Functions | |
Attribute (std::size_t id, const Table &table, const PrimitiveType *type, ThreadSafePooledString name) | |
Friends | |
struct | ConcreteTable |
M_LCOV_EXCL_START friend std::ostream & | operator<< (std::ostream &out, const Attribute &attr) |
An attribute of a table.
Every attribute belongs to exactly one table.
Definition at line 288 of file Schema.hpp.
|
inlineexplicitprivate |
Definition at line 303 of file Schema.hpp.
References m::PrimitiveType::is_vectorial().
|
delete |
|
default |
void Attribute::dump | ( | ) | const |
Definition at line 75 of file Schema.cpp.
References m::Schema::dump().
M_LCOV_EXCL_START void Attribute::dump | ( | std::ostream & | out | ) | const |
Definition at line 67 of file Schema.cpp.
M_LCOV_EXCL_STOP bool Attribute::is_unique | ( | ) | const |
Returns true
iff this
Attribute
is unique, i.e.
it is either specified with an UNIQUE constraint or it is a singleton primary key of the corresponding table.
Definition at line 59 of file Schema.cpp.
References m::and.
|
inline |
Definition at line 323 of file Schema.hpp.
|
inline |
Compares to attributes.
Attributes are equal if they have the same id
and belong to the same table
.
Definition at line 322 of file Schema.hpp.
|
friend |
Definition at line 290 of file Schema.hpp.
|
friend |
Definition at line 326 of file Schema.hpp.
std::size_t m::Attribute::id |
the internal identifier of the attribute, unique within its table
Definition at line 292 of file Schema.hpp.
Referenced by m::PaxStore::compute_block_offsets(), m::RowStore::compute_offsets(), m::PaxStore::offset(), m::RowStore::offset(), std::hash< m::Attribute >::operator()(), and operator==().
bool m::Attribute::is_hidden = false |
the flag indicates whether the attribute is hidden from the user
Definition at line 299 of file Schema.hpp.
ThreadSafePooledString m::Attribute::name |
the name of the attribute
Definition at line 295 of file Schema.hpp.
Referenced by m::generate_column_data(), and m::generate_correlated_column_data().
bool m::Attribute::not_nullable = false |
the flag indicating whether the attribute must not be NULL
Definition at line 296 of file Schema.hpp.
const Attribute* m::Attribute::reference = nullptr |
the referenced attribute
Definition at line 300 of file Schema.hpp.
const Table& m::Attribute::table |
the table the attribute belongs to
Definition at line 293 of file Schema.hpp.
Referenced by std::hash< m::Attribute >::operator()(), and operator==().
const PrimitiveType* m::Attribute::type |
the type of the attribute
Definition at line 294 of file Schema.hpp.
Referenced by m::PaxStore::compute_block_offsets(), m::RowStore::compute_offsets(), m::generate_column_data(), m::generate_correlated_column_data(), and m::type_check().
bool m::Attribute::unique = false |
the flag indicating whether the attribute is unique; note that a singleton primary key is also unique
Definition at line 298 of file Schema.hpp.