|
|
constexpr | Field (Field const &) noexcept=default |
| |
|
constexpr Field & | operator= (Field const &) noexcept=default |
| |
|
constexpr | Field (Field &&) noexcept=default |
| |
|
constexpr Field & | operator= (Field &&) noexcept=default |
| |
template<typename... S>
requires std::constructible_from<T, S...> |
| constexpr | Field (S &&... value) noexcept |
| | Constructs a new field with the given value.
|
| |
template<typename S >
requires std::constructible_from<T, S> && (!std::same_as<std::remove_cvref_t<S>, Field<T, P1, P2>>) |
| constexpr Field & | operator= (S &&value) noexcept |
| | Assigns a new value to the field.
|
| |
| constexpr std::weak_ordering | operator<=> (Field const &other) const noexcept |
| | Compares two fields for equality.
|
| |
|
bool | operator== (Field const &value) const noexcept=default |
| | Compares the field value with the given value for equality.
|
| |
|
bool | operator!= (Field const &value) const noexcept=default |
| | Compares the field value with the given value for inequality.
|
| |
template<typename S >
requires std::convertible_to<S, T> |
| bool | operator== (S const &value) const noexcept |
| | Compares the field value with the given value for equality.
|
| |
template<typename S >
requires std::convertible_to<S, T> |
| bool | operator!= (S const &value) const noexcept |
| | Compares the field value with the given value for inequality.
|
| |
| std::string | InspectValue () const |
| | Returns a string representation of the value, suitable for use in debugging and logging.
|
| |
| constexpr void | SetModified (bool value) noexcept |
| | Sets the modified state of the field.
|
| |
| constexpr bool | IsModified () const noexcept |
| | Checks if the field has been modified.
|
| |
| constexpr T const & | Value () const noexcept |
| | Returns the value of the field.
|
| |
| constexpr T & | MutableValue () noexcept |
| |
template<typename... S>
requires std::constructible_from<T, S...> |
| constexpr LIGHTWEIGHT_FORCE_INLINE | Field (S &&... value) noexcept |
| |
template<typename S >
requires std::constructible_from<T, S> && (!std::same_as<std::remove_cvref_t<S>, Field<T, P1, P2>>) |
| constexpr LIGHTWEIGHT_FORCE_INLINE Field< T, P1, P2 > & | operator= (S &&value) noexcept |
| |
template<typename S >
requires std::convertible_to<S, T> |
| LIGHTWEIGHT_FORCE_INLINE bool | operator== (S const &value) const noexcept |
| |
template<typename S >
requires std::convertible_to<S, T> |
| LIGHTWEIGHT_FORCE_INLINE bool | operator!= (S const &value) const noexcept |
| |
|
| static constexpr auto | IsPrimaryKeyValue = detail::Choose<PrimaryKey>(PrimaryKey::No, P1, P2) |
| |
| static constexpr auto | ColumnNameOverride = detail::Choose<std::string_view>({}, P1, P2) |
| |
| static constexpr auto | IsOptional = detail::IsStdOptional<T> |
| | Indicates if the field is optional, i.e., it can be NULL.
|
| |
| static constexpr auto | IsMandatory = !IsOptional |
| | Indicates if the field is mandatory, i.e., it cannot be NULL.
|
| |
| static constexpr auto | IsPrimaryKey = IsPrimaryKeyValue != PrimaryKey::No |
| | Indicates if the field is a primary key.
|
| |
| static constexpr auto | IsAutoAssignPrimaryKey = IsPrimaryKeyValue == PrimaryKey::AutoAssign |
| | Indicates if this is a primary key, it also is auto-assigned by the client.
|
| |
| static constexpr auto | IsAutoIncrementPrimaryKey = IsPrimaryKeyValue == PrimaryKey::ServerSideAutoIncrement |
| | Indicates if this is a primary key, it also is auto-incremented by the database.
|
| |
template<detail::FieldElementType T, auto P1 = std::nullopt, auto P2 = std::nullopt>
struct Lightweight::Field< T, P1, P2 >
Represents a single column in a table.
This class is used to represent a single column in a table. It also keeps track of modified-state of the field.
The column name, index, nullability, and type are known at compile time.
- See also
- DataMapper ,
Definition at line 83 of file Field.hpp.