ORM C++
Loading...
Searching...
No Matches
mapping.cppm File Reference
module orm
#include <array>
#include <concepts>
#include <cstddef>
#include <optional>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <utility>
import orm:foundation;
import orm.reflection;
Include dependency graph for mapping.cppm:

Go to the source code of this file.

Classes

struct  orm::model::ColumnName< Member, SqlName >
 Compile-time override of one aggregate member's SQL column name. More...
struct  orm::model::ColumnNames< Definitions >
struct  orm::model::StringLength< Member, Length >
struct  orm::model::StringLengths< Definitions >
struct  orm::model::PrimaryKey< Members >
struct  orm::model::AutoIncrement< Members >
struct  orm::model::LogicalTypeTraits< bool >
struct  orm::model::LogicalTypeTraits< char >
struct  orm::model::LogicalTypeTraits< signed char >
struct  orm::model::LogicalTypeTraits< unsigned char >
struct  orm::model::LogicalTypeTraits< short >
struct  orm::model::LogicalTypeTraits< unsigned short >
struct  orm::model::LogicalTypeTraits< int >
struct  orm::model::LogicalTypeTraits< unsigned int >
struct  orm::model::LogicalTypeTraits< long >
struct  orm::model::LogicalTypeTraits< unsigned long >
struct  orm::model::LogicalTypeTraits< long long >
struct  orm::model::LogicalTypeTraits< unsigned long long >
struct  orm::model::LogicalTypeTraits< float >
struct  orm::model::LogicalTypeTraits< double >
struct  orm::model::LogicalTypeTraits< std::string >
struct  orm::model::LogicalTypeTraits< Date >
struct  orm::model::LogicalTypeTraits< TimeOfDay >
struct  orm::model::LogicalTypeTraits< LocalDateTime >
struct  orm::model::LogicalTypeTraits< UtcTimestamp >
struct  orm::model::LogicalTypeTraits< Uuid >
struct  orm::model::LogicalTypeTraits< T >

Namespaces

namespace  orm
namespace  orm::model

Functions

template<auto Member, reflection::FixedString SqlName>
consteval auto orm::model::columnName () -> ColumnName< Member, SqlName >
 Creates a typed SQL column-name override.
template<typename... Definitions>
consteval auto orm::model::columnNames (Definitions...) -> ColumnNames< Definitions... >
 Groups typed SQL column-name overrides.
template<auto Member, std::size_t Length>
consteval auto orm::model::stringLength () -> StringLength< Member, Length >
template<typename... Definitions>
consteval auto orm::model::stringLengths (Definitions...) -> StringLengths< Definitions... >
template<auto... Members>
consteval auto orm::model::primaryKey () -> PrimaryKey< Members... >
 Defines an ordered, typed primary key. An empty definition makes the model explicitly keyless.
template<auto... Members>
consteval auto orm::model::autoIncrement () -> AutoIncrement< Members... >
 Defines typed auto-increment members. Static-model validation further restricts this to one non-null int primary-key member.
template<typename T>
consteval auto orm::model::logicalType () -> ColumnType
 Resolves a C++ field type to its logical database type at compile time. Users may extend the closed set through LogicalTypeTraits<T>.
template<auto Member, reflection::FixedString SqlName>
consteval auto orm::columnName ()
template<typename... Definitions>
consteval auto orm::columnNames (Definitions... definitions)
template<auto... Members>
consteval auto orm::primaryKey ()
template<auto Member, std::size_t Length>
consteval auto orm::stringLength ()
template<typename... Definitions>
consteval auto orm::stringLengths (Definitions... definitions)
template<auto... Members>
consteval auto orm::autoIncrement ()
template<typename T>
consteval auto orm::logicalType () -> model::ColumnType

Variables

template<typename T>
constexpr bool orm::model::isNullable = detail::StaticOptionalTraits<std::remove_cvref_t<T>>::isOptional