2021-03-09 14:10:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DataTypes/IDataType.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2021-08-18 20:34:07 +00:00
|
|
|
class ColumnString;
|
|
|
|
|
2021-03-09 14:10:28 +00:00
|
|
|
class DataTypeString final : public IDataType
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using FieldType = String;
|
2021-08-18 20:34:07 +00:00
|
|
|
using ColumnType = ColumnString;
|
2021-03-09 14:10:28 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|