|
libpqxx
The C++ client library for PostgreSQL
|
String traits for C-style string ("pointer to char const"). More...
#include <conversions.hxx>
Static Public Member Functions | |
| static char const * | from_string (std::string_view text, ctx={})=delete |
| constexpr static PQXX_ZARGS std::string_view | to_buf (std::span< char >, char const *const &value, ctx={}) noexcept |
| static constexpr PQXX_ZARGS std::size_t | size_buffer (char const *value) noexcept |
String traits for C-style string ("pointer to char const").
This conversion is not bidirectional. You can convert a C-style string to an SQL string, but not the other way around.
The reason for this is the terminating zero. The incoming SQL string is a std::string_view, which may or may not have a zero at the end. (And there's no reliable way of checking, since the next memory position may not be a valid address. Even if there happens to be a zero there, it isn't necessarily part of the same block of mmory.)
|
staticdelete |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |