◆ MultiFileColumnDefinition() [1/2]
| duckdb::MultiFileColumnDefinition::MultiFileColumnDefinition |
( |
const string & |
name, |
|
|
const LogicalType & |
type |
|
) |
| |
|
inline |
53364 : name(name), type(type) {
53365 }
◆ MultiFileColumnDefinition() [2/2]
53368 : name(other.name), type(other.type), children(other.children),
53369 default_expression(other.default_expression ? other.default_expression->Copy() : nullptr),
53371 }
Value identifier
Either the field_id or the name to map on.
Definition duckdb.cpp:53449
◆ operator=()
53373 {
53374 if (this != &other) {
53375 name = other.name;
53376 type = other.type;
53377 children = other.children;
53378 default_expression = other.default_expression ? other.default_expression->Copy() : nullptr;
53380 }
53381 return *this;
53382 }
◆ CreateFromNameAndType()
53385 {
53386 MultiFileColumnDefinition result(name, type);
53387 if (type.id() == LogicalTypeId::STRUCT) {
53388
53389 for (auto &child_entry : StructType::GetChildTypes(type)) {
53390 result.children.push_back(CreateFromNameAndType(child_entry.first, child_entry.second));
53391 }
53392 }
53393 return result;
53394 }
◆ ColumnsFromNamesAndTypes()
53397 {
53398 vector<MultiFileColumnDefinition> columns;
53399 D_ASSERT(names.size() == types.size());
53400 for (idx_t i = 0; i < names.size(); i++) {
53401 auto &name = names[i];
53402 auto &type = types[i];
53403 columns.push_back(CreateFromNameAndType(name, type));
53404 }
53405 return columns;
53406 }
◆ ExtractNamesAndTypes()
53409 {
53410 D_ASSERT(names.empty());
53411 D_ASSERT(types.empty());
53412 for (auto &column : columns) {
53413 names.push_back(column.name);
53414 types.push_back(column.type);
53415 }
53416 }
◆ GetIdentifierFieldId()
| int32_t duckdb::MultiFileColumnDefinition::GetIdentifierFieldId |
( |
| ) |
const |
|
inline |
53418 {
53420 D_ASSERT(
identifier.type().id() == LogicalTypeId::INTEGER);
53422 }
◆ GetIdentifierName()
| string duckdb::MultiFileColumnDefinition::GetIdentifierName |
( |
| ) |
const |
|
inline |
53424 {
53426
53427 return name;
53428 }
53429 D_ASSERT(
identifier.type().id() == LogicalTypeId::VARCHAR);
53431 }
◆ GetDefaultValue()
| Value duckdb::MultiFileColumnDefinition::GetDefaultValue |
( |
| ) |
const |
|
inline |
53433 {
53434 D_ASSERT(default_expression);
53435 if (default_expression->type != ExpressionType::VALUE_CONSTANT) {
53436 throw NotImplementedException("Default expression that isn't constant is not supported yet");
53437 }
53438 auto &constant_expr = default_expression->Cast<ConstantExpression>();
53439 return constant_expr.value;
53440 }
The documentation for this struct was generated from the following file:
- external/duckdb/duckdb.cpp