2017-06-15 09:12:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DataTypes/DataTypeNumberBase.h>
|
|
|
|
#include <DataTypes/IDataType.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-07-04 10:42:53 +00:00
|
|
|
class DataTypeUUID final : public DataTypeNumberBase<UInt128>
|
2017-06-15 09:12:32 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2017-07-16 03:05:40 +00:00
|
|
|
const char * getFamilyName() const override { return "UUID"; }
|
2018-08-20 15:17:55 +00:00
|
|
|
TypeIndex getTypeId() const override { return TypeIndex::UUID; }
|
2017-06-15 09:12:32 +00:00
|
|
|
|
2017-12-23 01:05:29 +00:00
|
|
|
bool equals(const IDataType & rhs) const override;
|
|
|
|
|
2017-12-09 06:32:22 +00:00
|
|
|
bool canBeUsedInBitOperations() const override { return true; }
|
|
|
|
bool canBeInsideNullable() const override { return true; }
|
2021-03-09 14:10:28 +00:00
|
|
|
bool canBeInsideLowCardinality() const override { return false; }
|
2020-06-14 04:35:50 +00:00
|
|
|
|
|
|
|
bool canBePromoted() const override { return false; }
|
2021-03-09 14:10:28 +00:00
|
|
|
|
|
|
|
SerializationPtr doGetDefaultSerialization() const override;
|
2017-06-15 09:12:32 +00:00
|
|
|
};
|
2017-12-09 06:32:22 +00:00
|
|
|
|
2017-06-15 09:12:32 +00:00
|
|
|
}
|