SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches
sqt::TableMapping< ENTITY > Struct Template Reference

Description

template<typename ENTITY>
struct sqt::TableMapping< ENTITY >

The primary template for mapping an entity type to its corresponding table type.

Template Parameters
ENTITYThe entity type to map.

sqt::TableMapping is a template intended to be specialized for each entity type. To enable table mapping for a specific entity type, its table type should be registered using the SQT_REGISTER macro.

The SQT_REGISTER macro generates a partial specialization of sqt::TableMapping for the specified entity type, defining a type alias that refers to the corresponding table type.

There are two helper templates to access the table type and its instance:

  • sqt::TableType<ENTITY>: Retrieves the mapped table type.
  • sqt::Table<ENTITY>: Retrieves a reference to the singleton instance of the table.
See also
SQT_REGISTER
sqt::TableType<>
sqt::Table<>