Cppgres
Build Postgres extensions in C++
Loading...
Searching...
No Matches
cppgres::datum_conversion< T, typename > Struct Template Reference

A trait to convert from and into a cppgres::datum. More...

#include <datum.hpp>

Static Public Member Functions

static T from_datum (const datum &, std::optional< memory_context > context=std::nullopt)=delete
 Convert from a datum.
 
static datum into_datum (const T &d)=delete
 Convert datum into a type.
 

Detailed Description

template<typename T, typename = void>
struct cppgres::datum_conversion< T, typename >

A trait to convert from and into a cppgres::datum.

Template Parameters
TC++ type to convert into and from

Member Function Documentation

◆ from_datum()

template<typename T , typename = void>
static T cppgres::datum_conversion< T, typename >::from_datum ( const datum ,
std::optional< memory_context context = std::nullopt 
)
staticdelete

Convert from a datum.

Gets an optional cppgres::memory_context when available to be able to determine the source of the (pointer) datum.

◆ into_datum()

template<typename T , typename = void>
static datum cppgres::datum_conversion< T, typename >::into_datum ( const T &  d)
staticdelete

Convert datum into a type.

Unlike from_datum, gets no memory context.


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