7#include <boost/uuid/uuid.hpp>
9#include <userver/storages/clickhouse/io/columns/column_includes.hpp>
11USERVER_NAMESPACE_BEGIN
24class MismatchedEndiannessUuidColumn
final
25 :
public ClickhouseColumn<MismatchedEndiannessUuidColumn> {
27 using cpp_type = boost::uuids::uuid;
28 using container_type = std::vector<cpp_type>;
30 MismatchedEndiannessUuidColumn(ColumnRef column);
32 static ColumnRef Serialize(
const container_type& from);
36class UuidRfc4122Column
final :
public ClickhouseColumn<UuidRfc4122Column> {
38 using cpp_type = boost::uuids::uuid;
39 using container_type = std::vector<cpp_type>;
41 UuidRfc4122Column(ColumnRef column);
43 static ColumnRef Serialize(
const container_type& from);
47class UuidColumn
final :
public ClickhouseColumn<UuidColumn> {
49 using cpp_type = boost::uuids::uuid;
50 using container_type = std::vector<cpp_type>;
58 static ColumnRef Serialize(
const T&) {
65 static void ReportMisuse() {
66 static_assert(!
sizeof(T),
67 "UuidColumn is deprecated: for old code rename it to "
68 "MismatchedEndiannessUuidColumn, for new code we encourage "
69 "you to use UuidRfc4122Column instead. See the "
70 "MismatchedEndiannessUuidColumn docs for explanation.");