|
| static constexpr zview | to_buf (char *, char *, char const (&value)[N]) noexcept |
| |
| static char * | into_buf (char *begin, char *end, char const (&value)[N]) |
| |
| static constexpr std::size_t | size_buffer (char const (&)[N]) noexcept |
| |
| static void | from_string (std::string_view)=delete |
| | Don't allow conversion to this type.
|
| |
| static zview | to_buf (char *begin, char *end, char const &value) |
| | Return a string_view representing value, plus terminating zero.
|
| |
| static char * | into_buf (char *begin, char *end, char const &value) |
| | Write value's string representation into buffer at begin.
|
| |
| static char | from_string (std::string_view text) |
| | Parse a string representation of a TYPE value.
|
| |
| static std::size_t | size_buffer (char const &value) noexcept |
| | Estimate how much buffer space is needed to represent value.
|
| |
template<std::size_t N>
struct pqxx::string_traits< char[N]>
String traits for C-style string constant ("pointer to array of char").
- Warning
- This assumes that every array-of-char is a C-style string literal. So, it must include a trailing zero. and it must have static duration.
Return a string_view representing value, plus terminating zero.
Produces a string_view containing the PostgreSQL string representation for value.
- Warning
- A null value has no string representation. Do not pass a null.
Uses the space from begin to end as a buffer, if needed. The returned string may lie somewhere in that buffer, or it may be a compile-time constant, or it may be null if value was a null value. Even if the string is stored in the buffer, its begin() may or may not be the same as begin.
The string_view is guaranteed to be valid as long as the buffer from begin to end remains accessible and unmodified.
- Exceptions
-
| pqxx::conversion_overrun | if the provided buffer space may not be enough. For maximum performance, this is a conservative estimate. It may complain about a buffer which is actually large enough for your value, if an exact check gets too expensive. |