-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
It would be great if you can also bind StringIO-objects, so that this code is possible:
require 'duckdb'
require 'stringio'
db = DuckDB::Database.open
csv_data = "id,name,age\n1,Alice,30\n2,Bob,25\n3,Charlie,35"
csv_io = StringIO.new(csv_data)
db.connect do |con|
con.query("CREATE TABLE test AS SELECT * FROM read_csv_auto(?, header = true)", csv_io)
end
At the moment it leads to the error:
... /3.3.0/gems/duckdb-1.2.0.0/lib/duckdb/prepared_statement.rb:288:in `bind_with_index': not supported type `#<StringIO:0x000001f1ceba5380>` (StringIO) (DuckDB::Error)
Metadata
Metadata
Assignees
Labels
No labels