libpqxx  7.5.2
pqxx::string_traits< TYPE > Struct Template Reference

Traits class for use in string conversions. More...

#include <strconv.hxx>

Static Public Member Functions

static zview to_buf (char *begin, char *end, TYPE const &value)
 Return a string_view representing value, plus terminating zero. More...
 
static char * into_buf (char *begin, char *end, TYPE const &value)
 Write value's string representation into buffer at begin. More...
 
static TYPE from_string (std::string_view text)
 Parse a string representation of a TYPE value. More...
 
static std::size_t size_buffer (TYPE const &value) noexcept
 Estimate how much buffer space is needed to represent value. More...
 

Detailed Description

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

Traits class for use in string conversions.

Specialize this template for a type for which you wish to add to_string and from_string support.

String conversions are not meant to work for nulls. Check for null before converting a value of TYPE to a string, or vice versa.


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