mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
36 lines
1.8 KiB
C++
36 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include <Common/UInt128.h>
|
|
#include <DataTypes/DataTypeNumberBase.h>
|
|
#include <DataTypes/IDataType.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class DataTypeUUID final : public DataTypeNumberBase<UInt128>
|
|
{
|
|
|
|
public:
|
|
const char * getFamilyName() const override { return "UUID"; }
|
|
TypeIndex getTypeId() const override { return TypeIndex::UUID; }
|
|
|
|
bool equals(const IDataType & rhs) const override;
|
|
|
|
void serializeText(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const override;
|
|
void serializeTextEscaped(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const override;
|
|
void deserializeTextEscaped(IColumn & column, ReadBuffer & istr, const FormatSettings &) const override;
|
|
void serializeTextQuoted(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const override;
|
|
void deserializeTextQuoted(IColumn & column, ReadBuffer & istr, const FormatSettings &) const override;
|
|
void serializeTextJSON(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const override;
|
|
void deserializeTextJSON(IColumn & column, ReadBuffer & istr, const FormatSettings &) const override;
|
|
void serializeTextCSV(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const override;
|
|
void deserializeTextCSV(IColumn & column, ReadBuffer & istr, const FormatSettings & settings) const override;
|
|
void serializeProtobuf(const IColumn & column, size_t row_num, ProtobufWriter & protobuf, size_t & value_index) const override;
|
|
void deserializeProtobuf(IColumn & column, ProtobufReader & protobuf, bool allow_add_row, bool & row_added) const override;
|
|
|
|
bool canBeUsedInBitOperations() const override { return true; }
|
|
bool canBeInsideNullable() const override { return true; }
|
|
};
|
|
|
|
}
|