-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi,
From the documentation and especially the "Inspect Data Values" section, it's not clear for me how to get proper value typings based on column types.
From what I understand columnType
and columnValue
are coming from different function return (probably from getColumnTypes()
and value()
for instance).
I don't think there's a trivial way to get the data type inferred like that, so in your example do you suggest to cast the corresponding column value based on its column type ?
Example :
if (columnTypes[0].typeId === DuckDBTypeId.VARCHAR) {
const value = result.value(0, 1) as DuckDBArrayValue; //fetching same column, row: 1
value.items // ok
}
Is there a better way using your api ?
nimrossum
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request