SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches

◆ SQT_REGISTER

#define SQT_REGISTER ( QUALIFIED_TABLE_NAME)

Registers the specified table type in the framework, enabling ORM capabilities for the associated entity type.

Parameters
QUALIFIED_TABLE_NAMEThe fully qualified table name, including its namespace, where it is defined using SQT_TABLE_BEGIN.

This macro generates a partial specialization of the sqt::TableMapping primary template, mapping the entity type to its corresponding table type.

Note
This macro must be used in the global scope.

Example usage:

namespace my_scope {
class MyEntity { };
// Define the table type for the entity type.
SQT_TABLE_BEGIN(MyEntityTable, MyEntity)
}
// Register the table type in the framework.
SQT_REGISTER(my_scope::MyEntityTable)
#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_REGISTER(QUALIFIED_TABLE_NAME)
Registers the specified table type in the framework, enabling ORM capabilities for the associated ent...
Definition table_definition.h:935
See also
SQT_TABLE_BEGIN
sqt::TableMapping<>