Defines an index with auto-generated names based on the specified columns.
struct MyEntity {
int id{};
std::string name;
};
#define SQT_COLUMN_FIELD(COLUMN_NAME, FIELD)
Defines a column that binds to the specified field of the entity type.
Definition table_definition.h:273
#define SQT_TABLE_BEGIN(TABLE_NAME, ENTITY_TYPE)
Begins the definition of a table type for the specified entity type.
Definition table_definition.h:141
#define SQT_TABLE_END
Ends the definition of a table type.
Definition table_definition.h:854
#define SQT_INDEX(...)
Defines an index with auto-generated names based on the specified columns.
Definition table_definition.h:733
The following code demonstrates the generated definition of the index in the table type:
class TableType {
public:
class IDType;
class NameType;
class IndexType_ID_Name :
public:
IndexType_IDName(const IndexType_IDName&) = delete;
IndexType_IDName& operator=(const IndexType_IDName&) = delete;
IndexType_IDName(IndexType_IDName&&) = delete;
IndexType_IDName& operator=(IndexType_IDName&&) = delete;
constexpr auto operator=(const ValueType&) const noexcept;
constexpr auto Asc() const noexcept;
constexpr auto Desc() const noexcept;
friend constexpr auto operator==(const IndexType_IDName&, const ValueType&) const noexcept;
friend constexpr auto operator==(const IndexType_IDName&, sqt::Placeholder) const noexcept;
friend constexpr auto operator==(const ValueType&, const IndexType_IDName&) const noexcept;
friend constexpr auto operator==(sqt::Placeholder, const IndexType_IDName&) const noexcept;
};
IndexType_ID_Name Index_ID_Name;
};
An interface that provides access to information about an index.
Definition abstract_index.h:26
The primary template for defining composite column types for various number of columns.
Definition composite_column.h:37