8 #if !defined(PQXX_HEADER_PRE) 9 # error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>." 15 #include "pqxx/internal/concat.hxx" 16 #include "pqxx/strconv.hxx" 19 #if defined(PQXX_HAVE_YEAR_MONTH_DAY) 26 struct nullness<
std::chrono::year_month_day>
27 : no_null<std::chrono::year_month_day>
60 template<>
struct PQXX_LIBEXPORT string_traits<
std::chrono::year_month_day>
62 [[nodiscard]]
static zview
63 to_buf(
char *begin,
char *end, std::chrono::year_month_day
const &value)
69 into_buf(
char *begin,
char *end, std::chrono::year_month_day
const &value);
71 [[nodiscard]]
static std::chrono::year_month_day
74 [[nodiscard]]
static std::size_t
75 size_buffer(std::chrono::year_month_day
const &) noexcept
77 static_assert(
int{(std::chrono::year::min)()} >= -99999);
78 static_assert(
int{(std::chrono::year::max)()} <= 99999);
79 return 5 + 1 + 2 + 1 + 2 + std::size(s_bc) + 1;
84 static constexpr std::string_view s_bc{
" BC"sv};
87 #endif // PQXX_HAVE_YEAR_MONTH_DAY std::size_t size_buffer(TYPE const &...value) noexcept
Estimate how much buffer space is needed to represent values as a string.
Definition: strconv.hxx:381
zview generic_to_buf(char *begin, char *end, TYPE const &value)
Implement string_traits<TYPE>::to_buf by calling into_buf.
Definition: strconv.hxx:442
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:26
std::vector< std::string_view > to_buf(char *here, char const *end, TYPE... value)
Convert multiple values to strings inside a single buffer.
Definition: strconv.hxx:349
T from_string(field const &value)
Convert a field's value to type T.
Definition: field.hxx:506