duckdb 0.3.5-dev4.0 → 0.3.5-dev8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +40 -0
- package/src/duckdb.hpp +40 -2
- package/src/parquet-amalgamation.cpp +32477 -32477
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -105104,6 +105104,24 @@ duckdb_logical_type duckdb_create_logical_type(duckdb_type type) {
|
|
|
105104
105104
|
return new duckdb::LogicalType(duckdb::ConvertCTypeToCPP(type));
|
|
105105
105105
|
}
|
|
105106
105106
|
|
|
105107
|
+
duckdb_logical_type duckdb_create_list_type(duckdb_logical_type type) {
|
|
105108
|
+
if (!type) {
|
|
105109
|
+
return nullptr;
|
|
105110
|
+
}
|
|
105111
|
+
duckdb::LogicalType *ltype = new duckdb::LogicalType;
|
|
105112
|
+
*ltype = duckdb::LogicalType::LIST(*(duckdb::LogicalType *)type);
|
|
105113
|
+
return ltype;
|
|
105114
|
+
}
|
|
105115
|
+
|
|
105116
|
+
duckdb_logical_type duckdb_create_map_type(duckdb_logical_type key_type, duckdb_logical_type value_type) {
|
|
105117
|
+
if (!key_type || !value_type) {
|
|
105118
|
+
return nullptr;
|
|
105119
|
+
}
|
|
105120
|
+
duckdb::LogicalType *mtype = new duckdb::LogicalType;
|
|
105121
|
+
*mtype = duckdb::LogicalType::MAP(*(duckdb::LogicalType *)key_type, *(duckdb::LogicalType *)value_type);
|
|
105122
|
+
return mtype;
|
|
105123
|
+
}
|
|
105124
|
+
|
|
105107
105125
|
duckdb_logical_type duckdb_create_decimal_type(uint8_t width, uint8_t scale) {
|
|
105108
105126
|
return new duckdb::LogicalType(duckdb::LogicalType::DECIMAL(width, scale));
|
|
105109
105127
|
}
|
|
@@ -105223,6 +105241,28 @@ duckdb_logical_type duckdb_list_type_child_type(duckdb_logical_type type) {
|
|
|
105223
105241
|
return new duckdb::LogicalType(duckdb::ListType::GetChildType(ltype));
|
|
105224
105242
|
}
|
|
105225
105243
|
|
|
105244
|
+
duckdb_logical_type duckdb_map_type_key_type(duckdb_logical_type type) {
|
|
105245
|
+
if (!type) {
|
|
105246
|
+
return nullptr;
|
|
105247
|
+
}
|
|
105248
|
+
auto &mtype = *((duckdb::LogicalType *)type);
|
|
105249
|
+
if (mtype.id() != duckdb::LogicalTypeId::MAP) {
|
|
105250
|
+
return nullptr;
|
|
105251
|
+
}
|
|
105252
|
+
return new duckdb::LogicalType(duckdb::MapType::KeyType(mtype));
|
|
105253
|
+
}
|
|
105254
|
+
|
|
105255
|
+
duckdb_logical_type duckdb_map_type_value_type(duckdb_logical_type type) {
|
|
105256
|
+
if (!type) {
|
|
105257
|
+
return nullptr;
|
|
105258
|
+
}
|
|
105259
|
+
auto &mtype = *((duckdb::LogicalType *)type);
|
|
105260
|
+
if (mtype.id() != duckdb::LogicalTypeId::MAP) {
|
|
105261
|
+
return nullptr;
|
|
105262
|
+
}
|
|
105263
|
+
return new duckdb::LogicalType(duckdb::MapType::ValueType(mtype));
|
|
105264
|
+
}
|
|
105265
|
+
|
|
105226
105266
|
idx_t duckdb_struct_type_child_count(duckdb_logical_type type) {
|
|
105227
105267
|
if (!type) {
|
|
105228
105268
|
return 0;
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.5-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "90ef0cff3"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.5-dev8"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -15975,6 +15975,24 @@ This should not be used with `DUCKDB_TYPE_DECIMAL`.
|
|
|
15975
15975
|
*/
|
|
15976
15976
|
DUCKDB_API duckdb_logical_type duckdb_create_logical_type(duckdb_type type);
|
|
15977
15977
|
|
|
15978
|
+
/*!
|
|
15979
|
+
Creates a list type from its child type.
|
|
15980
|
+
The resulting type should be destroyed with `duckdb_destroy_logical_type`.
|
|
15981
|
+
|
|
15982
|
+
* type: The child type of list type to create.
|
|
15983
|
+
* returns: The logical type.
|
|
15984
|
+
*/
|
|
15985
|
+
DUCKDB_API duckdb_logical_type duckdb_create_list_type(duckdb_logical_type type);
|
|
15986
|
+
|
|
15987
|
+
/*!
|
|
15988
|
+
Creates a map type from its key type and value type.
|
|
15989
|
+
The resulting type should be destroyed with `duckdb_destroy_logical_type`.
|
|
15990
|
+
|
|
15991
|
+
* type: The key type and value type of map type to create.
|
|
15992
|
+
* returns: The logical type.
|
|
15993
|
+
*/
|
|
15994
|
+
DUCKDB_API duckdb_logical_type duckdb_create_map_type(duckdb_logical_type key_type, duckdb_logical_type value_type);
|
|
15995
|
+
|
|
15978
15996
|
/*!
|
|
15979
15997
|
Creates a `duckdb_logical_type` of type decimal with the specified width and scale
|
|
15980
15998
|
The resulting type should be destroyed with `duckdb_destroy_logical_type`.
|
|
@@ -16054,6 +16072,26 @@ The result must be freed with `duckdb_destroy_logical_type`
|
|
|
16054
16072
|
*/
|
|
16055
16073
|
DUCKDB_API duckdb_logical_type duckdb_list_type_child_type(duckdb_logical_type type);
|
|
16056
16074
|
|
|
16075
|
+
/*!
|
|
16076
|
+
Retrieves the key type of the given map type.
|
|
16077
|
+
|
|
16078
|
+
The result must be freed with `duckdb_destroy_logical_type`
|
|
16079
|
+
|
|
16080
|
+
* type: The logical type object
|
|
16081
|
+
* returns: The key type of the map type. Must be destroyed with `duckdb_destroy_logical_type`.
|
|
16082
|
+
*/
|
|
16083
|
+
DUCKDB_API duckdb_logical_type duckdb_map_type_key_type(duckdb_logical_type type);
|
|
16084
|
+
|
|
16085
|
+
/*!
|
|
16086
|
+
Retrieves the value type of the given map type.
|
|
16087
|
+
|
|
16088
|
+
The result must be freed with `duckdb_destroy_logical_type`
|
|
16089
|
+
|
|
16090
|
+
* type: The logical type object
|
|
16091
|
+
* returns: The value type of the map type. Must be destroyed with `duckdb_destroy_logical_type`.
|
|
16092
|
+
*/
|
|
16093
|
+
DUCKDB_API duckdb_logical_type duckdb_map_type_value_type(duckdb_logical_type type);
|
|
16094
|
+
|
|
16057
16095
|
/*!
|
|
16058
16096
|
Returns the number of children of a struct type.
|
|
16059
16097
|
|