@duckdb/node-api
Advanced tools
Comparing version 1.1.3-alpha.11 to 1.1.3-alpha.12
@@ -119,2 +119,5 @@ "use strict"; | ||
if (input instanceof values_1.DuckDBListValue) { | ||
if (type.valueType.typeId === DuckDBTypeId_1.DuckDBTypeId.ANY) { | ||
throw new Error('Cannot create lists with item type of ANY. Specify a specific type.'); | ||
} | ||
return node_bindings_1.default.create_list_value(type.valueType.toLogicalType().logical_type, input.items.map((item) => createValue(type.valueType, item))); | ||
@@ -125,2 +128,5 @@ } | ||
if (input instanceof values_1.DuckDBStructValue) { | ||
if (type.entryTypes.find((type) => type.typeId === DuckDBTypeId_1.DuckDBTypeId.ANY)) { | ||
throw new Error('Cannot create structs with an entry type of ANY. Specify a specific type.'); | ||
} | ||
return node_bindings_1.default.create_struct_value(type.toLogicalType().logical_type, Object.values(input.entries).map((value, i) => createValue(type.entryTypes[i], value))); | ||
@@ -133,2 +139,5 @@ } | ||
if (input instanceof values_1.DuckDBArrayValue) { | ||
if (type.valueType.typeId === DuckDBTypeId_1.DuckDBTypeId.ANY) { | ||
throw new Error('Cannot create arrays with item type of ANY. Specify a specific type.'); | ||
} | ||
return node_bindings_1.default.create_array_value(type.valueType.toLogicalType().logical_type, input.items.map((item) => createValue(type.valueType, item))); | ||
@@ -154,3 +163,3 @@ } | ||
case DuckDBTypeId_1.DuckDBTypeId.ANY: | ||
throw new Error(`cannot create values of type ANY`); | ||
throw new Error(`Cannot create values of type ANY. Specify a specific type.`); | ||
case DuckDBTypeId_1.DuckDBTypeId.VARINT: | ||
@@ -157,0 +166,0 @@ throw new Error(`not yet implemented for VARINT`); // TODO: implement when available in 1.2.0 |
{ | ||
"name": "@duckdb/node-api", | ||
"version": "1.1.3-alpha.11", | ||
"version": "1.1.3-alpha.12", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"dependencies": { | ||
"@duckdb/node-bindings": "1.1.3-alpha.11" | ||
"@duckdb/node-bindings": "1.1.3-alpha.12" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
361400
7905
+ Added@duckdb/node-bindings@1.1.3-alpha.12(transitive)
+ Added@duckdb/node-bindings-darwin-arm64@1.1.3-alpha.12(transitive)
+ Added@duckdb/node-bindings-darwin-x64@1.1.3-alpha.12(transitive)
+ Added@duckdb/node-bindings-linux-arm64@1.1.3-alpha.12(transitive)
+ Added@duckdb/node-bindings-linux-x64@1.1.3-alpha.12(transitive)
+ Added@duckdb/node-bindings-win32-x64@1.1.3-alpha.12(transitive)
- Removed@duckdb/node-bindings@1.1.3-alpha.11(transitive)
- Removed@duckdb/node-bindings-darwin-arm64@1.1.3-alpha.11(transitive)
- Removed@duckdb/node-bindings-darwin-x64@1.1.3-alpha.11(transitive)
- Removed@duckdb/node-bindings-linux-arm64@1.1.3-alpha.11(transitive)
- Removed@duckdb/node-bindings-linux-x64@1.1.3-alpha.11(transitive)
- Removed@duckdb/node-bindings-win32-x64@1.1.3-alpha.11(transitive)