|
libpqxx
The C++ client library for PostgreSQL
|
String traits for non-const C-style string ("pointer to char"). More...
#include <conversions.hxx>
Static Public Member Functions | |
| static std::string_view | to_buf (std::span< char > buf, char *const &value, ctx c={}) |
| static std::size_t | size_buffer (char *const &value) noexcept |
| static char * | from_string (std::string_view, ctx={})=delete |
String traits for non-const C-style string ("pointer to char").
This conversion is not bidirectional. You can convert a char * to an SQL string, but not vice versa.
There are two reasons. One is the fact that an SQL string arrives in the form of a std::string_view; there is no guarantee of a trailing zero.
The other reason is constness. We can't give you a non-const pointer into a string that was handed into the conversion as const.
|
staticdelete |
|
inlinestaticnoexcept |
|
inlinestatic |