libpqxx  7.9.0
pqxx::string_traits< unsigned char > Struct Reference

You cannot convert an unsigned char to/from SQL. More...

#include <strconv.hxx>

Inheritance diagram for pqxx::string_traits< unsigned char >:

Additional Inherited Members

- Static Public Member Functions inherited from pqxx::forbidden_conversion< unsigned char >
static zview to_buf (char *, char *, unsigned char const &)
 
static char * into_buf (char *, char *, unsigned char const &)
 
static unsigned char from_string (std::string_view)
 
static std::size_t size_buffer (unsigned char const &) noexcept
 
- Static Public Attributes inherited from pqxx::forbidden_conversion< unsigned char >
static constexpr bool converts_to_string
 
static constexpr bool converts_from_string
 

Detailed Description

You cannot convert an unsigned char to/from SQL.

Converting this type may seem simple enough, but it's ambiguous: Did you mean the char value as a small integer? Or were you thinking of a single-character string (and if so, using what encoding)? Or perhaps it's just a raw byte value?

If you meant it as an integer, use an appropriate integral type such as int or short or unsigned int etc.

If you wanted a single-character string, use std::string_view (or a similar type such as std::string).

Or if you had a raw byte in mind, try pqxx::bytes_view instead.


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