◆ GetPos()
72495 {
72496 auto info = type.AuxInfo();
72497 switch (type.InternalType()) {
72499 return TemplatedGetPos(info->Cast<EnumTypeInfoTemplated<uint8_t>>().GetValues(), key);
72501 return TemplatedGetPos(info->Cast<EnumTypeInfoTemplated<uint16_t>>().GetValues(), key);
72503 return TemplatedGetPos(info->Cast<EnumTypeInfoTemplated<uint32_t>>().GetValues(), key);
72504 default:
72505 throw InternalException("ENUM can only have unsigned integers (except UINT64) as physical types");
72506 }
72507}
@ UINT32
Unsigned 32-bit little-endian integer.
Definition duckdb.hpp:2758
@ UINT16
Unsigned 16-bit little-endian integer.
Definition duckdb.hpp:2752
@ UINT8
Unsigned 8-bit little-endian integer.
Definition duckdb.hpp:2746
◆ GetValuesInsertOrder()
140769 {
140770 D_ASSERT(type.id() == LogicalTypeId::ENUM);
140771 auto info = type.AuxInfo();
140772 return info->Cast<EnumTypeInfo>().GetValuesInsertOrder();
140773}
◆ GetSize()
140775 {
140776 D_ASSERT(type.id() == LogicalTypeId::ENUM);
140777 auto info = type.AuxInfo();
140778 return info->Cast<EnumTypeInfo>().GetDictSize();
140779}
◆ GetValue()
| const string duckdb::EnumType::GetValue |
( |
const Value & | val | ) |
|
|
static |
140763 {
140764 auto info = val.type().AuxInfo();
140765 auto &values_insert_order = info->Cast<EnumTypeInfo>().GetValuesInsertOrder();
140766 return StringValue::Get(values_insert_order.GetValue(val.GetValue<uint32_t>()));
140767}
◆ GetPhysicalType()
140781 {
140782 D_ASSERT(type.id() == LogicalTypeId::ENUM);
140783 auto aux_info = type.AuxInfo();
140784 auto &info = aux_info->Cast<EnumTypeInfo>();
140785 D_ASSERT(info.GetEnumDictType() == EnumDictType::VECTOR_DICT);
140786 return EnumTypeInfo::DictType(info.GetDictSize());
140787}
◆ GetString()
72509 {
72510 D_ASSERT(pos < EnumType::GetSize(type));
72511 return FlatVector::GetData<string_t>(EnumType::GetValuesInsertOrder(type))[pos];
72512}
The documentation for this struct was generated from the following files: