libpqxx
The C++ client library for PostgreSQL
Loading...
Searching...
No Matches
pqxx::forbidden_conversion< TYPE > Struct Template Reference

String traits for a forbidden type conversion. More...

Static Public Member Functions

static zview to_buf (char *, char *, TYPE const &)
static char * into_buf (char *, char *, TYPE const &)
static TYPE from_string (std::string_view)
static std::size_t size_buffer (TYPE const &) noexcept

Static Public Attributes

static constexpr bool converts_to_string {false}
static constexpr bool converts_from_string {false}

Detailed Description

template<typename TYPE>
struct pqxx::forbidden_conversion< TYPE >

String traits for a forbidden type conversion.

If you have a C++ type for which you explicitly wish to forbid SQL conversion, you can derive a pqxx::string_traits specialisation for that type from this struct. Any attempt to convert the type will then fail to build, and produce an error mentioning oops_forbidden_conversion.

Member Function Documentation

◆ from_string()

template<typename TYPE>
TYPE pqxx::forbidden_conversion< TYPE >::from_string ( std::string_view )
inlinestatic

◆ into_buf()

template<typename TYPE>
char * pqxx::forbidden_conversion< TYPE >::into_buf ( char * ,
char * ,
TYPE const &  )
inlinestatic

◆ size_buffer()

template<typename TYPE>
std::size_t pqxx::forbidden_conversion< TYPE >::size_buffer ( TYPE const & )
inlinestaticnoexcept

◆ to_buf()

template<typename TYPE>
zview pqxx::forbidden_conversion< TYPE >::to_buf ( char * ,
char * ,
TYPE const &  )
inlinestatic

Member Data Documentation

◆ converts_from_string

template<typename TYPE>
bool pqxx::forbidden_conversion< TYPE >::converts_from_string {false}
staticconstexpr

◆ converts_to_string

template<typename TYPE>
bool pqxx::forbidden_conversion< TYPE >::converts_to_string {false}
staticconstexpr

The documentation for this struct was generated from the following file:
  • /builddir/build/BUILD/libpqxx-7.10.5-build/libpqxx-7.10.5/redhat-linux-build/include/pqxx/strconv.hxx