ORM C++
Loading...
Searching...
No Matches
orm::model::ModelView Struct Referenceexport
module orm

Trivially-copyable handle to one model in immutable Schema storage. More...

Collaboration diagram for orm::model::ModelView:

Public Member Functions

constexpr auto valid () const noexcept -> bool
constexpr operator bool () const noexcept
constexpr auto operator== (std::nullptr_t) const noexcept -> bool
constexpr auto operator== (const ModelView &) const noexcept -> bool=default
constexpr auto operator* () const noexcept -> const ModelView &
constexpr auto operator-> () const noexcept -> const ModelDataView *
constexpr auto data () const noexcept -> const ModelDataView &
constexpr auto findColumn (std::string_view fieldOrSqlName) const noexcept -> const ColumnView *
constexpr auto findRelation (std::string_view fieldOrSqlName) const noexcept -> const RelationView *
constexpr auto findRelationField (std::string_view fieldName) const noexcept -> const RelationView *
constexpr auto resolveTarget (const ColumnView &column) const noexcept -> ModelView
constexpr auto resolveTarget (const RelationView &relation) const noexcept -> ModelView
constexpr auto resolveJunction (const RelationView &relation) const noexcept -> JunctionView
constexpr auto primaryKeySize () const noexcept -> std::size_t

Public Attributes

const SchemaView * schema {}
std::size_t modelIndex {noTargetModel}

Detailed Description

Trivially-copyable handle to one model in immutable Schema storage.

Definition at line 180 of file views.cppm.

Member Function Documentation

◆ data()

auto orm::model::ModelView::data ( ) const -> const ModelDataView &
nodiscardconstexprnoexcept

Definition at line 268 of file views.cppm.

◆ findColumn()

auto orm::model::ModelView::findColumn ( std::string_view fieldOrSqlName) const -> const ColumnView *
nodiscardconstexprnoexcept

Definition at line 273 of file views.cppm.

◆ findRelation()

auto orm::model::ModelView::findRelation ( std::string_view fieldOrSqlName) const -> const RelationView *
nodiscardconstexprnoexcept

Definition at line 278 of file views.cppm.

◆ findRelationField()

auto orm::model::ModelView::findRelationField ( std::string_view fieldName) const -> const RelationView *
nodiscardconstexprnoexcept

Definition at line 283 of file views.cppm.

◆ operator bool()

orm::model::ModelView::operator bool ( ) const
explicitnodiscardconstexprnoexcept

Definition at line 248 of file views.cppm.

◆ operator*()

auto orm::model::ModelView::operator* ( ) const -> const ModelView &
nodiscardconstexprnoexcept

Definition at line 258 of file views.cppm.

◆ operator->()

auto orm::model::ModelView::operator-> ( ) const -> const ModelDataView *
nodiscardconstexprnoexcept

Definition at line 263 of file views.cppm.

◆ operator==() [1/2]

auto orm::model::ModelView::operator== ( const ModelView & ) const -> bool=default
nodiscardconstexprdefaultnoexcept

◆ operator==() [2/2]

auto orm::model::ModelView::operator== ( std::nullptr_t ) const -> bool
nodiscardconstexprnoexcept

Definition at line 253 of file views.cppm.

◆ primaryKeySize()

auto orm::model::ModelView::primaryKeySize ( ) const -> std::size_t
nodiscardconstexprnoexcept

Definition at line 333 of file views.cppm.

◆ resolveJunction()

auto orm::model::ModelView::resolveJunction ( const RelationView & relation) const -> JunctionView
nodiscardconstexprnoexcept

Definition at line 306 of file views.cppm.

◆ resolveTarget() [1/2]

auto orm::model::ModelView::resolveTarget ( const ColumnView & column) const -> ModelView
nodiscardconstexprnoexcept

Definition at line 288 of file views.cppm.

◆ resolveTarget() [2/2]

auto orm::model::ModelView::resolveTarget ( const RelationView & relation) const -> ModelView
nodiscardconstexprnoexcept

Definition at line 297 of file views.cppm.

◆ valid()

auto orm::model::ModelView::valid ( ) const -> bool
nodiscardconstexprnoexcept

Definition at line 243 of file views.cppm.

Member Data Documentation

◆ modelIndex

std::size_t orm::model::ModelView::modelIndex {noTargetModel}

Definition at line 183 of file views.cppm.

◆ schema

const SchemaView* orm::model::ModelView::schema {}

Definition at line 182 of file views.cppm.


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