11 #include "pqxx/internal/concat.hxx" 12 #include "pqxx/strconv" 15 #if defined(PQXX_HAVE_YEAR_MONTH_DAY) 22 struct nullness<
std::chrono::year_month_day>
23 : no_null<std::chrono::year_month_day>
56 template<>
struct PQXX_LIBEXPORT string_traits<
std::chrono::year_month_day>
58 [[nodiscard]]
static zview
59 to_buf(
char *begin,
char *end, std::chrono::year_month_day
const &value)
65 into_buf(
char *begin,
char *end, std::chrono::year_month_day
const &value);
67 [[nodiscard]]
static std::chrono::year_month_day
70 [[nodiscard]]
static std::size_t
71 size_buffer(std::chrono::year_month_day
const &) noexcept
73 static_assert(
int{(std::chrono::year::min)()} >= -99999);
74 static_assert(
int{(std::chrono::year::max)()} <= 99999);
75 return 5 + 1 + 2 + 1 + 2 + std::size(s_bc) + 1;
80 static constexpr std::string_view s_bc{
" BC"sv};
83 #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:375
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:343
T from_string(field const &value)
Convert a field's value to type T.
Definition: field.hxx:494
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:22
zview generic_to_buf(char *begin, char *end, TYPE const &value)
Implement string_traits<TYPE>::to_buf by calling into_buf.
Definition: strconv.hxx:439