A table definition.
More...
#include <TableDefinition.hpp>
◆ column_index_type
◆ TableDefinition() [1/2]
Creates a table definition with the given name and no columns.
- Parameters
-
name | The name of the table. |
persistence | The persistence of the table. |
◆ TableDefinition() [2/2]
Creates a table definition with the given name and columns.
- Parameters
-
name | The name of the table. |
columns | The columns of the table. |
persistence | The persistence of the table. |
◆ addColumn() [1/2]
Adds a column to the definition.
- Parameters
-
- Returns
*this
, to allow call chaining.
◆ addColumn() [2/2]
Adds a column to the definition.
- Parameters
-
- Returns
*this
, to allow call chaining.
◆ getColumn()
const Column & hyperapi::TableDefinition::getColumn |
( |
hyper_field_index_t |
columnIndex | ) |
const |
Returns the column at the given position.
- Parameters
-
columnIndex | The index of the column |
- Returns
- The column at the given position (staring with 0).
- Precondition
- 0 <= columnIndex < getColumnCount()
◆ getColumnByName()
const Column * hyperapi::TableDefinition::getColumnByName |
( |
const Name & |
s | ) |
const |
|
noexcept |
Returns the column with the given name.
- Parameters
-
- Returns
- The column with the given name or
nullptr
if no such column exists.
◆ getColumnCount()
size_t hyperapi::TableDefinition::getColumnCount |
( |
| ) |
const |
|
inlinenoexcept |
◆ getColumnPositionByName()
optional< hyper_field_index_t > hyperapi::TableDefinition::getColumnPositionByName |
( |
const Name & |
s | ) |
const |
|
noexcept |
Returns the position of the column with the given name.
- Parameters
-
- Returns
- The position of the column with the given name if such column exists.
◆ getColumns()
const std::vector< Column > & hyperapi::TableDefinition::getColumns |
( |
| ) |
const |
|
inlinenoexcept |
◆ getPersistence()
Persistence hyperapi::TableDefinition::getPersistence |
( |
| ) |
const |
|
inlinenoexcept |
◆ getTableName()
const TableName & hyperapi::TableDefinition::getTableName |
( |
| ) |
const |
|
inlinenoexcept |
◆ setPersistence()
Sets the table's persistence.
- Parameters
-
- Returns
*this
, to allow call chaining.
◆ setTableName()
Sets the table's name.
- Parameters
-
- Returns
*this
, to allow call chaining.
The documentation for this class was generated from the following file: