@malloydata/db-duckdb
Advanced tools
Comparing version 0.0.226-dev250113222119 to 0.0.226
@@ -140,2 +140,18 @@ "use strict"; | ||
}); | ||
it('parses struct with sql native field', () => { | ||
const structDef = makeStructDef(); | ||
connection.fillStructDefFromTypeMap(structDef, { test: PROFESSOR_SCHEMA }); | ||
expect(structDef.fields[0]).toEqual({ | ||
'name': 'test', | ||
'type': 'array', | ||
'elementTypeDef': { type: 'record_element' }, | ||
'join': 'many', | ||
'fields': [ | ||
{ 'name': 'professor_id', 'type': 'sql native', 'rawType': 'UUID' }, | ||
{ 'name': 'name', 'type': 'string' }, | ||
{ 'name': 'age', 'numberType': 'integer', 'type': 'number' }, | ||
{ 'name': 'total_sections', 'numberType': 'integer', 'type': 'number' }, | ||
], | ||
}); | ||
}); | ||
it('parses a simple type', () => { | ||
@@ -149,2 +165,11 @@ const structDef = makeStructDef(); | ||
}); | ||
it('parses unknown type', () => { | ||
const structDef = makeStructDef(); | ||
connection.fillStructDefFromTypeMap(structDef, { test: 'UUID' }); | ||
expect(structDef.fields[0]).toEqual({ | ||
'name': 'test', | ||
'type': 'sql native', | ||
'rawType': 'UUID', | ||
}); | ||
}); | ||
}); | ||
@@ -226,2 +251,3 @@ }); | ||
const dblType = { type: 'number', numberType: 'float' }; | ||
const PROFESSOR_SCHEMA = 'STRUCT(professor_id UUID, "name" VARCHAR, age BIGINT, total_sections BIGINT)[]'; | ||
//# sourceMappingURL=duckdb.spec.js.map |
{ | ||
"name": "@malloydata/db-duckdb", | ||
"version": "0.0.226-dev250113222119", | ||
"version": "0.0.226", | ||
"license": "MIT", | ||
@@ -44,3 +44,3 @@ "main": "./dist/index.js", | ||
"@duckdb/duckdb-wasm": "1.29.0", | ||
"@malloydata/malloy": "^0.0.226-dev250113222119", | ||
"@malloydata/malloy": "^0.0.226", | ||
"@motherduck/wasm-client": "^0.6.6", | ||
@@ -47,0 +47,0 @@ "apache-arrow": "^17.0.0", |
65158
1560
+ Added@types/node@20.17.17(transitive)
+ Addedexponential-backoff@3.1.2(transitive)
+ Addedpossible-typed-array-names@1.1.0(transitive)
+ Addedsemver@7.7.1(transitive)
- Removed@types/node@20.17.16(transitive)
- Removedexponential-backoff@3.1.1(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedsemver@7.7.0(transitive)
Updated@malloydata/malloy@^0.0.226