ORM C++
Loading...
Searching...
No Matches
orm::model::Schema< Models > Struct Template Referenceexport
module orm

A closed compile-time set of ORM models. More...

Collaboration diagram for orm::model::Schema< Models >:

Static Public Member Functions

template<typename Model>
static consteval auto indexOf () -> std::size_t
static constexpr auto modelAt (std::size_t index) noexcept -> ModelView

Static Public Attributes

template<typename Model>
static constexpr bool contains = (std::same_as<Model, Models> || ...)
static constexpr std::array< const ModelDataView *, sizeof...(Models)> modelStorage
static constexpr SchemaView view {.models = modelStorage}

Detailed Description

template<typename... Models>
struct orm::model::Schema< Models >

A closed compile-time set of ORM models.

Definition at line 437 of file schema.cppm.

Member Function Documentation

◆ indexOf()

template<typename... Models>
template<typename Model>
consteval auto orm::model::Schema< Models >::indexOf ( ) -> std::size_t
inlinestaticnodiscardconsteval

Definition at line 448 of file schema.cppm.

◆ modelAt()

template<typename... Models>
constexpr auto orm::model::Schema< Models >::modelAt ( std::size_t index) -> ModelView
inlinestaticnodiscardconstexprnoexcept

Definition at line 463 of file schema.cppm.

Member Data Documentation

◆ contains

template<typename... Models>
template<typename Model>
bool orm::model::Schema< Models >::contains = (std::same_as<Model, Models> || ...)
inlinestaticconstexpr

Definition at line 445 of file schema.cppm.

◆ modelStorage

template<typename... Models>
std::array<const ModelDataView*, sizeof...(Models)> orm::model::Schema< Models >::modelStorage
inlinestaticconstexpr
Initial value:
{
&StaticModel<Models, Schema<Models...>>::data...}
A closed compile-time set of ORM models.
Definition schema.cppm:438
Materializes one aggregate model's complete scalar metadata in static storage.
Definition schema.cppm:50

Definition at line 468 of file schema.cppm.

◆ view

template<typename... Models>
SchemaView orm::model::Schema< Models >::view {.models = modelStorage}
inlinestaticconstexpr

Definition at line 480 of file schema.cppm.


The documentation for this struct was generated from the following files: