ORM C++
Loading...
Searching...
No Matches
model.hpp
1
#pragma once
2
3
#include "model/GetModelInfo.hpp"
4
5
namespace
orm
6
{
15
template
<
typename
T>
16
class
Model
17
{
18
public
:
24
static
auto
getModelInfo
(
bool
force =
false
) -> model::ModelInfo&
25
{
26
if
(not modelInfo.has_value() or force)
27
{
28
modelInfo = model::getModelInfo<T>();
29
}
30
31
return
modelInfo.value();
32
}
33
34
private
:
35
inline
static
std::optional<model::ModelInfo> modelInfo = std::nullopt;
36
};
37
}
// namespace orm
orm::Model
A template class representing a model in the ORM framework.
Definition
model.hpp:17
orm::Model::getModelInfo
static auto getModelInfo(bool force=false) -> model::ModelInfo &
Get the model info for the model.
Definition
model.hpp:24
include
orm-cxx
model.hpp
Generated by
1.11.0