9#include <userver/storages/clickhouse/io/columns/column_includes.hpp>
11USERVER_NAMESPACE_BEGIN
21template <size_t Precision,
typename T>
22class DateTime64Column;
24template <size_t Precision,
typename Rep,
typename Period,
25 template <
typename,
typename>
typename Duration>
26class DateTime64Column<Precision, Duration<Rep, Period>>
28 DateTime64Column<Precision, Duration<Rep, Period>>> {
30 using cpp_type = std::chrono::system_clock::time_point;
31 using container_type = std::vector<cpp_type>;
34 static constexpr size_t kPrecision = Precision;
35 using time_resolution = Duration<Rep, Period>;
37 using time_resolution =
typename Tag::time_resolution;
39 DateTime64Column(ColumnRef column);
41 static ColumnRef Serialize(
const container_type& from);
45using DateTime64ColumnMilli = DateTime64Column<3, std::chrono::milliseconds>;
48using DateTime64ColumnMicro = DateTime64Column<6, std::chrono::microseconds>;
51using DateTime64ColumnNano = DateTime64Column<9, std::chrono::nanoseconds>;