relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::schema::column_traits< T > Struct Template Reference

Contains schema definition components. More...

#include <relx/schema/core.hpp>

Static Public Member Functions

static std::string to_sql_string (const T &value)
 Convert a C++ value to a SQL string representation.
 
static T from_sql_string (const std::string &value)
 Parse a SQL string representation to a C++ value.
 

Static Public Attributes

static constexpr auto sql_type_name = "TEXT"
 The SQL type name for this C++ type.
 
static constexpr bool nullable = false
 Whether this type can be NULL.
 

Detailed Description

template<typename T>
struct relx::schema::column_traits< T >

Contains schema definition components.

Metadata for a SQL column

Definition at line 18 of file core.hpp.

Member Function Documentation

◆ from_sql_string()

template<typename T >
static T relx::schema::column_traits< T >::from_sql_string ( const std::string &  value)
static

Parse a SQL string representation to a C++ value.

◆ to_sql_string()

template<typename T >
static std::string relx::schema::column_traits< T >::to_sql_string ( const T &  value)
static

Convert a C++ value to a SQL string representation.

Member Data Documentation

◆ nullable

template<typename T >
constexpr bool relx::schema::column_traits< T >::nullable = false
staticconstexpr

Whether this type can be NULL.

Definition at line 23 of file core.hpp.

◆ sql_type_name

template<typename T >
constexpr auto relx::schema::column_traits< T >::sql_type_name = "TEXT"
staticconstexpr

The SQL type name for this C++ type.

Definition at line 20 of file core.hpp.


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