Closed goenning closed 4 weeks ago
For future readers, it turns out you can do this:
var arr duckdb.Composite[[]string]
if err := db.QueryRowContext(ctx, "SELECT ['a','b']").Scan(&arr); err != nil {
return nil, fmt.Errorf("failed to scan array: %w", err)
}
// arr.Get() is []string
The code above fails with
failed to scan array: sql: Scan error on column index 0, name "main.list_value('a', 'b')": unsupported Scan, storing driver.Value type []interface {} into type *[]string