Defines a model that can be stored in an SQL database. Implements queries for this type to the database (insert, update, select, delete)
More...
#include <AUI/Data/ASqlModel.h>
template<typename Model>
struct ASqlModel< Model >
- Template Parameters
-
- Note
- Model should implement AModelMeta (see AUI/Data/AModelMeta.h)
◆ byId()
template<typename Model>
static Model ASqlModel< Model >::byId |
( |
id_t | id | ) |
|
|
inlinestatic |
- Parameters
-
id | ID of the required string |
- Returns
- the string table for the specified ID
- Exceptions
-
◆ getIdColumnNameInOtherTables()
- Returns
- name of the relation column for other tables.
Example: struct User -> table users -> column user_id is the result.
◆ hasMany()
template<typename Model>
template<typename Other>
_< typename Other::IncompleteSelectRequest > ASqlModel< Model >::hasMany |
( |
| ) |
|
|
inlineprotected |
◆ make()
template<typename Model>
template<typename ... Args>
static Model ASqlModel< Model >::make |
( |
Args &&... | args | ) |
|
|
inlinestatic |
- Template Parameters
-
Args | the types of constructor arguments |
- Parameters
-
args | the constructor arguments |
- Returns
- the ORM structure