Hyper API for C++
0.0.17231
Hyper client library for C++ applications
|
Go to the documentation of this file.
5 #ifndef TABLEAU_HYPER_TABLEDEFINITION_HPP
6 #define TABLEAU_HYPER_TABLEDEFINITION_HPP
11 #include <hyperapi/impl/infra.hpp>
16 #include <hyperapi/hyperapi.h>
70 const std::string&
getCollation() const noexcept {
return collation; }
100 const std::string collation;
124 const std::vector<Column>&
getColumns() const noexcept {
return columns; }
193 std::vector<Column> columns;
195 friend class internal::HyperTableDefinition;
199 #include <hyperapi/impl/TableDefinition.impl.hpp>
Persistence
Possible persistence levels for database objects.
const std::vector< Column > & getColumns() const noexcept
Returns all columns.
TableDefinition & setPersistence(Persistence p) noexcept
Sets the table's persistence.
TableDefinition(TableName name, Persistence persistence=Persistence::Permanent)
Creates a table definition with the given name and no columns.
const std::string & getCollation() const noexcept
Returns the collation of the column.
The column can contain NULL values.
hyper_field_index_t column_index_type
Type of a column index.
Temporary: Only available in the own session, not persisted.
Represents an escaped SQL name.
The column cannot contain NULL values.
const Column & getColumn(hyper_field_index_t columnIndex) const
Returns the column at the given position.
optional< hyper_field_index_t > getColumnPositionByName(const Name &s) const noexcept
Returns the position of the column with the given name.
Surrogate for C++17 std::optional
const Name & getName() const noexcept
Returns the name of the column.
std::ostream & operator<<(std::ostream &os, const DatabaseName &name)
Stream output operator.
Nullability
The nullability of a column.
Persistence getPersistence() const noexcept
Returns the table persistence.
The primary namespace of the Hyper API for C++.
A Column of a table definition.
Nullability getNullability() const noexcept
Returns the Nullability of the column.
size_t getColumnCount() const noexcept
Returns the numbers of columns.
TableDefinition & addColumn(Column &&c) noexcept
Adds a column to the definition.
Represents an escaped SQL table name.
const TableName & getTableName() const noexcept
Returns the name of the table.
Column(Name name, SqlType type, Nullability nullability=Nullability::Nullable)
Creates a column.
const Column * getColumnByName(const Name &s) const noexcept
Returns the column with the given name.
TableDefinition & setTableName(TableName n) noexcept
Sets the table's name.
const SqlType & getType() const noexcept
Returns the type of the column.