AUI Framework
master
Cross-platform base for C++ UI apps
|
Defines model metadata (list of fields, name of appropriate sql table, etc...) More...
#include <AUI/Data/AModelMeta.h>
Static Public Member Functions# | |
static AMap< AString, _< AField< T > > > | getFields () |
static AString | getSqlTable () |
Additional Inherited Members# | |
![]() | |
using | Model = T |
T | Model // user model
struct User: ASqlModel<User> {
id_t id;
AString username;
AString password;
};
// metadata
A_META(User) {
// appropriate sql table
A_SQL_TABLE("users")
// appropriate fields
A_FIELDS {
return {
A_FIELD(id)
A_FIELD(username)
A_FIELD(password)
};
}
};
Defines a model that can be stored in an SQL database. Implements queries for this type to the databa... Definition ASqlModel.h:26 |