|
|
string | name |
| | Name of the Type.
|
|
LogicalType | type |
| | Logical Type.
|
|
unique_ptr< SQLStatement > | query |
| | Used by create enum from query.
|
|
bind_logical_type_function_t | bind_function |
| | Bind type modifiers to the type.
|
|
CatalogType | type |
| | The to-be-created catalog type.
|
|
string | catalog |
| | The catalog name of the entry.
|
|
string | schema |
| | The schema name of the entry.
|
|
OnCreateConflict | on_conflict |
| | What to do on create conflict.
|
|
bool | temporary |
| | Whether or not the entry is temporary.
|
|
bool | internal |
| | Whether or not the entry is an internal entry.
|
|
string | sql |
| | The SQL string of the CREATE statement.
|
|
LogicalDependencyList | dependencies |
| | The inherent dependencies of the created entry.
|
|
Value | comment |
| | User provided comment.
|
|
InsertionOrderPreservingMap< string > | tags |
| | Key-value tags with additional metadata.
|
|
ParseInfoType | info_type |
|
|
static constexpr const ParseInfoType | TYPE = ParseInfoType::CREATE_INFO |
◆ CreateTypeInfo() [1/2]
| duckdb::CreateTypeInfo::CreateTypeInfo |
( |
| ) |
|
339809 : CreateInfo(CatalogType::TYPE_ENTRY),
bind_function(
nullptr) {
339810}
bind_logical_type_function_t bind_function
Bind type modifiers to the type.
Definition duckdb.hpp:53874
◆ CreateTypeInfo() [2/2]
339812 : CreateInfo(CatalogType::TYPE_ENTRY),
name(std::move(name_p)),
type(std::move(type_p)),
339814}
string name
Name of the Type.
Definition duckdb.hpp:53868
LogicalType type
Logical Type.
Definition duckdb.hpp:53870
◆ Copy()
| unique_ptr< CreateInfo > duckdb::CreateTypeInfo::Copy |
( |
| ) |
const |
|
overridevirtual |
Implements duckdb::CreateInfo.
339816 {
339817 auto result = make_uniq<CreateTypeInfo>();
339818 CopyProperties(*result);
339819 result->name =
name;
339820 result->type =
type;
339822 result->query =
query->Copy();
339823 }
339825 return std::move(result);
339826}
unique_ptr< SQLStatement > query
Used by create enum from query.
Definition duckdb.hpp:53872
◆ Serialize()
| void duckdb::CreateTypeInfo::Serialize |
( |
Serializer & | serializer | ) |
const |
|
overridevirtual |
Reimplemented from duckdb::CreateInfo.
415820 {
415821 CreateInfo::Serialize(serializer);
415822 serializer.WritePropertyWithDefault<
string>(200,
"name",
name);
415823 serializer.WriteProperty<LogicalType>(201,
"logical_type",
type);
415824}
◆ Deserialize()
415826 {
415827 auto result = duckdb::unique_ptr<CreateTypeInfo>(new CreateTypeInfo());
415828 deserializer.ReadPropertyWithDefault<string>(200, "name", result->name);
415829 deserializer.ReadProperty<LogicalType>(201, "logical_type", result->type);
415830 return std::move(result);
415831}
◆ ToString()
| string duckdb::CreateTypeInfo::ToString |
( |
| ) |
const |
|
overridevirtual |
Reimplemented from duckdb::CreateInfo.
339828 {
339831 if (
type.id() == LogicalTypeId::ENUM) {
339832 auto &values_insert_order = EnumType::GetValuesInsertOrder(
type);
339834
339835 result += " AS ENUM ( ";
339837 result += "'" + values_insert_order.GetValue(i).ToString() + "'";
339838 if (i != size - 1) {
339839 result += ", ";
339840 }
339841 }
339842 result += " );";
339843 }
else if (
type.id() == LogicalTypeId::INVALID) {
339844
339846 result +=
" AS ENUM (" +
query->ToString() +
")";
339847 } else {
339848 result += " AS ";
339849 result +=
type.ToString();
339850 }
339851 result += ";";
339852 return result;
339853}
GOpaque< Size > size(const GMat &src)
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
bool temporary
Whether or not the entry is temporary.
Definition duckdb.hpp:28166
DUCKDB_API string GetCreatePrefix(const string &entry) const
Returns a string like "CREATE (OR REPLACE) (TEMPORARY) <entry> (IF NOT EXISTS) " for TABLE/VIEW/TYPE/...
Definition duckdb.cpp:339436
string catalog
The catalog name of the entry.
Definition duckdb.hpp:28160
string schema
The schema name of the entry.
Definition duckdb.hpp:28162
The documentation for this struct was generated from the following files: