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,
template <
typename,
typename>
typename Duration>
25class DateTime64Column<Precision, Duration<Rep, Period>>
26 :
public ClickhouseColumn<DateTime64Column<Precision, Duration<Rep, Period>>> {
28 using cpp_type = std::chrono::system_clock::time_point;
29 using container_type = std::vector<cpp_type>;
32 static constexpr size_t kPrecision = Precision;
33 using time_resolution = Duration<Rep, Period>;
35 using time_resolution =
typename Tag::time_resolution;
37 DateTime64Column(ColumnRef column);
39 static ColumnRef Serialize(
const container_type& from);
43using DateTime64ColumnMilli = DateTime64Column<3, std::chrono::milliseconds>;
46using DateTime64ColumnMicro = DateTime64Column<6, std::chrono::microseconds>;
49using DateTime64ColumnNano = DateTime64Column<9, std::chrono::nanoseconds>;