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)
23using namespace std::literals;
26struct nullness<std::chrono::year_month_day>
27 : no_null<std::chrono::year_month_day>
60template<>
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)
65 return generic_to_buf(begin, end, 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};
The home of all libpqxx classes, functions, templates, etc.
Definition array.hxx:33
T from_string(field const &value)
Convert a field's value to type T.
Definition field.hxx:520