ClickHouse/src/DataTypes/DataTypeString.h
2021-11-09 12:11:54 +00:00

45 lines
1.2 KiB
C++

#pragma once
#include <DataTypes/IDataType.h>
namespace DB
{
class ColumnString;
class DataTypeString final : public IDataType
{
public:
using FieldType = String;
using ColumnType = ColumnString;
static constexpr bool is_parametric = false;
static constexpr auto type_id = TypeIndex::String;
const char * getFamilyName() const override
{
return "String";
}
TypeIndex getTypeId() const override { return type_id; }
MutableColumnPtr createColumn() const override;
Field getDefault() const override;
bool equals(const IDataType & rhs) const override;
bool isParametric() const override { return false; }
bool haveSubtypes() const override { return false; }
bool isComparable() const override { return true; }
bool canBeComparedWithCollation() const override { return true; }
bool isValueUnambiguouslyRepresentedInContiguousMemoryRegion() const override { return true; }
bool isCategorial() const override { return true; }
bool canBeInsideNullable() const override { return true; }
bool canBeInsideLowCardinality() const override { return true; }
SerializationPtr doGetDefaultSerialization() const override;
};
}