Changelog
All notable changes to this project will be documented in this file.
Unreleased
-
add experimental
DuckDB::Result#arrow_c_streamreturningDuckDB::ArrowArrayStreamto export a query result as an Arrow C stream (Arrow C Data Interface). The stream can be consumed directly by ruby-polars (Polars::DataFrame.new(result)) and red-arrow (Arrow::RecordBatchReader.import(stream.to_i)). -
drop Ruby 3.2.
-
add
DuckDB::TableFunction::InitInfo#max_threads=(and set_max_threads) to hintDuckDBhow many worker threads can execute a custom table function concurrently. -
add
DuckDB::TableFunction::InitInfo#column_countto get the number of projected result columns of a custom table function scan.
1.5.3.0 - 2026-05-24
-
bump up
DuckDB1.5.3 on CI. -
add
DuckDB::AggregateFunctionSetclass andDuckDB::Connection#register_aggregate_function_setto register multiple overloads of a custom aggregate function under one SQL name. -
add
DuckDB::TableNameParsermodule with shared table name parsing logic (quoting and dot-notation), included byDuckDB::AppenderandDuckDB::TableDescription. -
add
DuckDB::PreparedStatement#bind_timestamp_tzto bind aTIMESTAMP WITH TIME ZONE(TIMESTAMPTZ) parameter from aTimeor timestamp string. -
DuckDB::AggregateFunction#name=andDuckDB::ScalarFunction#name=now accept Symbol arguments (coerced to String).Breaking Changes
-
DuckDB::ScalarFunction.create:name:is now a required keyword argument (previously optional withnildefault). Parameter order changed toname:, return_type:, .... -
DuckDB::ScalarFunctionSet#add: no longer overrides the scalar function’s name with the set’s name. The individual function must have its own name set before being added to the set. -
DuckDB::TableDescription.new: the 2nd argument now parses dot-notation and quoting: -
'schema.table'is interpreted as schema-qualified (deprecated; useschema:keyword instead). -
'"schema.table"'or"'schema.table'"— quotes are stripped and the name is treated as a literal table name containing a dot. -
DuckDB::Appender.new: the 2nd argument now parses dot-notation and quoting (previously onlyConnection#appenderdid this): -
'schema.table'is interpreted as schema-qualified (deprecated; useschema:keyword instead). -
'"schema.table"'or"'schema.table'"— quotes are stripped and the name is treated as a literal table name containing a dot. -
DuckDB::Connection#appender: table name parsing (dot-notation, quoting) is now delegated toDuckDB::Appender.newinternally. Behavior is unchanged —'schema.table'has always split on dot inConnection#appender. No deprecation warning is emitted. -
DuckDB::Connection#appender: table names surrounded by double or single quotes (e.g.'"a.b"'or"'a.b'") are treated as literal table names — the quotes are stripped and no dot-splitting is performed. -
fix:
Connection#appender('a.b')no longer emits a misleading deprecation warning (the behavior was not deprecated — it was already the correct behavior). -
add
DuckDB::Appender.new(con, table, schema: nil, catalog: nil)keyword argument form. -
add
DuckDB::Connection#appender(table, schema: nil, catalog: nil)keyword argument form. -
deprecate
DuckDB::Result#_column_type(i)private method. usecolumns[i].send(:_type)instead. -
DuckDB::Result#enum_dictionary_valueschecks invalid column index. -
deprecate
DuckDB::Result#_enum_dictionary_sizeprivate method. -
deprecate
DuckDB::Result#_enum_dictionary_valueprivate method.Deprecations
-
deprecate
DuckDB::Appender.new(con, schema, table)3-positional-argument form. UseDuckDB::Appender.new(con, table, schema: schema)instead. -
deprecate passing dot-notation string (e.g.
'schema.table') directly toDuckDB::Appender.new. UseDuckDB::Appender.new(con, table, schema: schema)instead.
1.5.2.1 - 2026-04-24
-
add
DuckDB::Appender#clearto discard all unflushed data from the appender without writing it to the table (requiresDuckDB>= 1.5.0). -
fix gemspec to use
git ls-files, preventing precompiled x86_64.sofrom being bundled into the gem and breaking non-x86 platforms.
1.5.2.0 - 2026-04-16
-
add
DuckDB::DataChunk#resetto clear a chunk’s contents so it can be reused across multipleAppender#append_data_chunkcalls without reallocation. -
add
DuckDB::Database.new(path = :memory, config: nil, &block)to create a database instance.pathis a positional argument (default:memoryfor in-memory database, or a String path for file database).config:accepts an optionalDuckDB::Configobject. When a block is given, the database is yielded and automatically closed afterwards. -
add
TIME_NScolumn support toDuckDB::Result.TIME_NSvalues are returned asTimeobjects with nanoseconds truncated to microseconds. -
add
INTERVALas a supportedreturn_typeforDuckDB::ScalarFunction. The scalar function block can now return aDuckDB::Intervalobject and it will be written back to the result vector correctly. -
add
UUIDas a supportedreturn_typeforDuckDB::ScalarFunction. The scalar function block can now return a UUID string and it will be written back to the result vector correctly. -
add
DuckDB::Connection#extractto extract multiple SQL statements as prepared statements without executing them. -
add
DuckDB::Connection#register_logical_typeto register a custom logical type with a connection. -
add
DuckDB::Appender#append_data_chunkto append aDuckDB::DataChunkin one call. -
add
DuckDB::DataChunk.new(types)to create an owned data chunk from Ruby logical types. -
add
DuckDB::TableDescriptionto retrieve metadata about a table (withDuckDB>= 1.5.0). -
add
DuckDB::ColumnDescriptionto describe a column’s name, logical type, and whether it has a default value (withDuckDB>= 1.5.0).
Breaking Changes
-
rename
DuckDB::ValueImpltoDuckDB::Value -
remove
DuckDB::ExtractedStatementsImpl. useDuckDB::ExtractedStatements -
DuckDB::Database.opento delegate toDuckDB::Database.new. The signature changes fromopen(dbpath = nil, config = nil)toopen(path = :memory, config: nil).DuckDB::Database.opennow accepts:memorysymbol andconfig:keyword argument.
1.5.1.1 - 2026-04-04
-
fix
DuckDB::ScalarFunctionto allowHUGEINTandUHUGEINTasreturn_typeand parameter type (the C extension’s vector write path was missing those cases). -
add
DuckDB::ScalarFunctionSetto register multiple overloads of a scalar function under one name (wrapsduckdb_scalar_function_set). -
add
DuckDB::ScalarFunctionSet#addto add aDuckDB::ScalarFunctionoverload to the set (wrapsduckdb_add_scalar_function_to_set). -
add
DuckDB::Connection#register_scalar_function_setto register aDuckDB::ScalarFunctionSetwith the connection (wrapsduckdb_register_scalar_function_set). -
DuckDB::ScalarFunction.createnow acceptsname: nil(optional) to allow creating nameless functions for use inside aScalarFunctionSet. -
add
DuckDB::LogicalType.create_structto create a struct logical type. -
add
DuckDB::LogicalType.create_enumto create an enum logical type. -
add
DuckDB::LogicalType.create_decimalto create a decimal logical type.
1.5.1.0 - 2026-03-29
-
add
DuckDB::ScalarFunction#varargs_type=to register a scalar function that accepts a variable number of arguments of a given type (wrapsduckdb_scalar_function_set_varargs). -
DuckDB::ScalarFunction.createacceptsvarargs_type:keyword argument (mutually exclusive withparameter_type:/parameter_types:). -
add
DuckDB::ScalarFunction#set_special_handlingto make the block receivenilfor NULL inputs instead ofDuckDBshort-circuiting (wrapsduckdb_scalar_function_set_special_handling). -
DuckDB::ScalarFunction.createacceptsnull_handling: truekeyword to enable special NULL handling. -
add
34 => :anytoConverter::IntToSym::HASH_TYPESand:anytoScalarFunction::SUPPORTED_TYPESsoDuckDB::LogicalType::ANYcan be used withvarargs_type=. -
add
DuckDB::ScalarFunction#set_bindto register a bind callback (wrapsduckdb_scalar_function_set_bind). The block receives aDuckDB::ScalarFunction::BindInfoobject at query planning time (once, before per-row execution). -
add
DuckDB::ScalarFunction::BindInfo#argument_countto return the number of arguments passed to the scalar function (wrapsduckdb_scalar_function_bind_get_argument_count). -
add
DuckDB::ScalarFunction::BindInfo#set_error(message)to report an error early at planning time (wrapsduckdb_scalar_function_bind_set_error). -
add
DuckDB::ScalarFunction::BindInfo#get_argument(index)to return the expression at the given argument index as aDuckDB::Expressionobject (wrapsduckdb_scalar_function_bind_get_argument). RaisesArgumentErrorfor out-of-range index. -
add
DuckDB::Expression#foldable?to check whether an expression can be folded to a constant at query planning time (wrapsduckdb_expression_is_foldable). Returnstruefor literals and constant arithmetic,falsefor column references and non-deterministic functions. -
add
DuckDB::LogicalType.create_mapto create a map logical type. -
add
DuckDB::LogicalType.create_unionto create a union logical type. -
bump duckdb to 1.5.1 on CI
-
add
DuckDB::ScalarFunction::BindInfo#client_contextto return the client context of the bind phase as aDuckDB::ClientContextobject (wrapsduckdb_scalar_function_get_client_context). -
add
DuckDB::ClientContext#connection_idto return the connection id of the client context (wrapsduckdb_client_context_get_connection_id). -
add
DuckDB::Expression#fold(client_context)to fold a constant expression to a native Ruby value at query planning time (wrapsduckdb_expression_fold). Returns Integer, Float, String, true/false, or nil. RaisesDuckDB::Errorif the expression is not foldable.
Breaking changes
-
rename
DuckDB::BindInfotoDuckDB::TableFunction::BindInfo.DuckDB::BindInfostill works but emits a deprecation warning. -
rename
DuckDB::InitInfotoDuckDB::TableFunction::InitInfo.DuckDB::InitInfostill works but emits a deprecation warning. -
rename
DuckDB::FunctionInfotoDuckDB::TableFunction::FunctionInfo.DuckDB::FunctionInfostill works but emits a deprecation warning.
1.5.0.2 - 2026-03-22
-
add
DuckDB.vector_sizeto return theDuckDBvector size (number of rows processed per vectorized operation). -
DuckDB::ScalarFunction.create,DuckDB::ScalarFunction#add_parameter,DuckDB::ScalarFunction#return_type=accept logical type symbol as argument. -
add
DuckDB.default_timezoneconfiguration (defaults to:local) to control how TIMESTAMP and TIME values without time zone are converted to RubyTime(:utcor:local).
1.5.0.1 - 2026-03-17
-
enable
DuckDB::ScalarFunctionwork with duckdb multi threads. -
fix mysql_query fails
1.5.0.0 - 2026-03-15
-
bump duckdb to 1.5.0 on CI.
Breaking changes
-
remove
DuckDB::PrepareadStatement#pending_prepared_streammethod. UseDuckDB::PreparedStatement#pending_preparedinstead. -
remove
DuckDB::Connection#async_query_streammethod. UseDuckDB::Connection#async_queryinstead. -
drop duckdb v1.3.x.
1.4.4.0 - 2026-03-07
-
DuckDB::DataChunk#set_valueaccepts date. -
add
DuckDB::LogicalType.create_arrayto create an array logical type -
add
DuckDB::LogicalType.create_listto create a list logical type. -
DuckDB::BindInfo#add_result_columnaccepts symbols as column, column type argument. -
add
DuckDB.cast. -
support TIMESTAMP_TZ column writing Ruby Time object in
DuckDB::DataChunk#set_value. -
add
DuckDB::MemoryHelper.write_timestamp_tzmethod to write a Ruby Time object as aDuckDBTIMESTAMP_TZ (microseconds since Unix epoch UTC) to raw memory. -
support TIMESTAMP column writing Ruby Time object in
DuckDB::DataChunk#set_value. -
add
DuckDB::MemoryHelper.write_timestampmethod to write a Ruby Time object as aDuckDBtimestamp to raw memory. -
add
DuckDB::Connection#expose_as_tableto expose a Ruby object as a queryableDuckDBtable function via a registered adapter. -
add
DuckDB::TableFunction.add_table_adapterto register a table adapter for a Ruby class. -
add
DuckDB::TableFunction.table_adapter_forto look up a registered table adapter by class. -
add
DuckDB::TableFunction.createclass method for declarative table function creation -
Automatically sets output.size from return value
-
Supports positional and named parameters
-
Execute block returns row count (0 when done)
-
Simplifies table function development with cleaner API
-
add
DuckDB::DataChunk#set_valuemethod for high-level value writing with automatic type conversion. -
add
DuckDB::MemoryHelperwrite methods for all numeric types (boolean, tinyint, smallint, utinyint, usmallint, uinteger, ubigint, float). -
add
DuckDB::Vector#set_validitymethod to mark rows as NULL or valid. -
add
DuckDB::Vector#assign_string_element_lenmethod for BLOB data with null bytes. -
add
DuckDB::Vector#logical_typemethod to get the column type of a vector. -
add
DuckDB::TableFunctionclass (Phase 1: Core container). -
add
DuckDB::TableFunction#initializefor standard Ruby allocation pattern. -
add
DuckDB::TableFunction#name=for setting function name. -
add
DuckDB::TableFunction#add_parameterfor positional parameters. -
add
DuckDB::TableFunction#add_named_parameterfor named parameters. -
add
DuckDB::TableFunction#bindfor setting bind callback (Phase 2). -
add
DuckDB::BindInfoclass for table function bind phase (Phase 2). -
add
DuckDB::BindInfo#parameter_countfor getting parameter count. -
add
DuckDB::BindInfo#get_parameterfor accessing positional parameters. -
add
DuckDB::BindInfo#get_named_parameterfor accessing named parameters. -
add
DuckDB::BindInfo#add_result_columnfor defining output schema. -
add
DuckDB::BindInfo#set_cardinalityfor performance hints. -
add
DuckDB::BindInfo#set_errorfor reporting bind errors. -
add
DuckDB::DataChunkclass for table function output data (Phase 3). -
add
DuckDB::DataChunk#column_countfor getting number of columns. -
add
DuckDB::DataChunk#sizefor getting number of rows. -
add
DuckDB::DataChunk#size=for setting number of rows. -
add
DuckDB::DataChunk#get_vectorfor accessing column vectors. -
add
DuckDB::Vectorclass for column data access (Phase 3). -
add
DuckDB::Vector#get_datafor raw data pointer access. -
add
DuckDB::Vector#get_validityfor validity mask access. -
add
DuckDB::Vector#assign_string_elementfor writing string values. -
add
DuckDB::MemoryHelpermodule for writing primitive values to vectors. -
add
DuckDB::MemoryHelper.write_bigintfor writing BIGINT values. -
add
DuckDB::MemoryHelper.write_integerfor writing INTEGER values. -
add
DuckDB::MemoryHelper.write_doublefor writing DOUBLE values. -
add
DuckDB::TableFunction#executefor setting execute callback (Phase 4). -
add
DuckDB::FunctionInfoclass for table function execution context (Phase 4). -
add
DuckDB::FunctionInfo#set_errorfor reporting execution errors. -
add
DuckDB::TableFunction#initfor setting init callback (Phase 5). -
add
DuckDB::InitInfoclass for table function initialization context (Phase 5). -
add
DuckDB::InitInfo#set_errorfor reporting initialization errors. -
add
DuckDB::Connection#register_table_functionfor registering table functions (Phase 6). -
bump duckdb to 1.4.4 on CI.
-
add inline style to
DuckDB::Connection#register_scalar_function(accepts keyword arguments + block). -
add
DuckDB::ScalarFunction.createclass method for declarative API. -
add FLOAT support to
DuckDB::ScalarFunctionreturn type. -
add BOOLEAN support to
DuckDB::ScalarFunctionreturn type. -
add DOUBLE support to
DuckDB::ScalarFunctionreturn type. -
add BIGINT support to
DuckDB::ScalarFunctionreturn type. -
refactor
DuckDB::ScalarFunctionto use vector_set_value_at helper. -
fix
DuckDB::ScalarFunctionNULL input handling. -
fix
DuckDB::ScalarFunctionINTEGER output type (int32 vs int64). -
add
DuckDB::ScalarFunction#set_return_type. -
bump bundler 4.0 in duckdb.gemspec.
1.4.3.0 - 2026-01-10
-
bump duckdb to 1.4.3 on CI.
1.4.2.0 - 2025-12-27
-
support Ruby 4.0.0, add Ruby 4.0.0 on CI.
-
drop duckdb v1.2.x.
-
bump duckdb to 1.3.0.
-
bump duckdb to 1.4.2 on CI.
1.4.1.1 - 2025-11-03
-
DuckDB::Connection#appender_from_queryaccepts block.1.4.1.0 - 2025-11-01
-
add
DuckDB::LogicalType.boolean,DuckDB::LogicalType.tinyint,DuckDB::LogicalType.smallint,DuckDB::LogicalType.integer,DuckDB::LogicalType.bigint,DuckDB::LogicalType.utinyint,DuckDB::LogicalType.usmallint,DuckDB::LogicalType.uinteger,DuckDB::LogicalType.ubigint,DuckDB::LogicalType.float,DuckDB::LogicalType.double,DuckDB::LogicalType.timestamp,DuckDB::LogicalType.date,DuckDB::LogicalType.time,DuckDB::LogicalType.interval,DuckDB::LogicalType.hugeint,DuckDB::LogicalType.uhugeint,DuckDB::LogicalType.varchar,DuckDB::LogicalType.blob,DuckDB::LogicalType.timestamp_s,DuckDB::LogicalType.timestamp_ms,DuckDB::LogicalType.timestamp_ns,DuckDB::LogicalType.bit,DuckDB::LogicalType.time_tz,DuckDB::LogicalType.timestamp_tz. -
add
DuckDB::LogicalType::BOOLEAN,DuckDB::LogicalType::TINYINT,DuckDB::LogicalType::SMALLINT,DuckDB::LogicalType::INTEGER,DuckDB::LogicalType::BIGINT,DuckDB::LogicalType::UTINYINT,DuckDB::LogicalType::USMALLINT,DuckDB::LogicalType::UINTEGER,DuckDB::LogicalType::UBIGINT,DuckDB::LogicalType::FLOAT,DuckDB::LogicalType::DOUBLE,DuckDB::LogicalType::TIMESTAMP,DuckDB::LogicalType::DATE,DuckDB::LogicalType::TIME,DuckDB::LogicalType::INTERVAL,DuckDB::LogicalType::HUGEINT,DuckDB::LogicalType::UHUGEINT,DuckDB::LogicalType::VARCHAR,DuckDB::LogicalType::BLOB,DuckDB::LogicalType::TIMESTAMP_S,DuckDB::LogicalType::TIMESTAMP_MS,DuckDB::LogicalType::TIMESTAMP_NS,DuckDB::LogicalType::BIT,DuckDB::LogicalType::TIME_TZ,DuckDB::LogicalType::TIMESTAMP_TZ. -
Support TIMESTAMP_NS infinity, -infinity value.
-
bump duckdb to 1.3.2, 1.4.1 on CI.
-
add
DuckDB::ValueImplclass. This class is under construction. You must not use this class directly. -
add
DuckDB::ScalarFunctionclass. This class is under construction. -
add
DuckDB::ScalarFunction#set_name. -
add
DuckDB::LogicalType.new(type_id)to create a logical type from a type ID.
1.3.1.0 - 2025-06-28
-
Support TIMESTAMP_S, TIMESTAMP_MS infinity, -infinity value.
-
bump duckdb to 1.3.1 on CI.
-
drop dcukdb v1.1.x.
1.3.0.0 - 2025-05-31
-
bump duckdb to 1.3.0 on CI.
Breaking changes
-
DuckDB::Result#streaming?is deprecated. -
The second argument of
DuckDB::PendingResult.newis now meaningless. The result is the same when it is set to true. -
DuckDB::PreparedStatement#pending_preparedbehaves the same asDuckDB::PreparedStatement#pending_prepared_stream. -
DuckDB::PreparedStatement#pending_prepared_streamwill be depreacted. Usepending_preparedinstead. -
DuckDB::Connection#async_querybehaves the same asDuckDB::Connection#async_query_stream. -
DuckDB::Connection#async_query_streamwill be deprecated. Use async_query instead. -
DuckDB::Result#chunk_each,DuckDB::Result.use_chunk_each,DuckDB::Result.use_chunk_each?are deprecated.
1.2.2.0 - 2025-05-11
-
drop Ruby 3.1.
-
implement
DuckDB::InstanceCacheclass. -
bump duckdb to 1.2.2 on CI.
-
add
DuckDB::PreparedStatement#bind_uint8,DuckDB::PreparedStatement#bind_uint16,DuckDB::PreparedStatement#bind_uint32,DuckDB::PreparedStatement#bind_uint64. -
add
DuckDB::LogicalTypeclass. -
DuckDB::LogicalTypeclass is under construction.DuckDB::LogicalType#internal_type,DuckDB::LogicalType#dictionary_size,DuckDB::LogicalType#dictionary_value_at,DuckDB::LogicalType#each_dictionary_value,DuckDB::LogicalType#alias, andDuckDB::LogicalType#alias=are available.
1.2.1.0 - 2025-03-30
-
bump duckdb v1.2.1 on CI.
-
drop duckdb v1.0.0.
-
add
DuckDB::LogicalTypeclass. -
DuckDB::LogicalTypeclass is under construction.DuckDB::LogicalType#member_count,DuckDB::LogicalType#member_name_at,DuckDB::LogicalType#member_type_at,DuckDB::LogicalType#each_member_name,DuckDB::LogicalType#each_member_type,DuckDB::LogicalType#child_count,DuckDB::LogicalType#child_name_at,DuckDB::LogicalType#child_type_at,DuckDB::LogicalType#each_child_name, andDuckDB::LogicalType#each_child_typeare available. -
fix error message when
DuckDB::Appender#append_uint16,DuckDB::Appender#append_uint32,DuckDB::Appender#append_uint64,DuckDB::Appender#append_float,DuckDB::Appender#append_double,DuckDB::Appender#append_varchar,DuckDB::Appender#append_varchar_length,DuckDB::Appender#append_blob,DuckDB::Appender#append_null,DuckDB::Appender#append_default,DuckDB::Appender#append_date,DuckDB::Appender#append_interval,DuckDB::Appender#append_time,DuckDB::Appender#append_timestamp,DuckDB::Appender#append_hugeintfailed.
1.2.0.0 - 2025-02-24
-
bump duckdb to 1.2.0.
-
add
DuckDB::LogicalTypeclass(Thanks to @otegami). -
DuckDB::LogicalTypeclass is under construction.DuckDB::LogicalType#type,DuckDB::LogicalType#width,DuckDB::LogicalType#scale,DuckDB::LogicalType#child_type,DuckDB::LogicalType#size,DuckDB::LogicalType#key_type, andDuckDB::LogicalType#value_typeare available. -
fix error message when
DuckDB::Appender#flush,DuckDB::Appender#close,DuckDB::Appender#end_row,DuckDB::Appender#append_bool,DuckDB::Appender#append_int8,DuckDB::Appender#append_int16,DuckDB::Appender#append_int32,DuckDB::Appender#append_int64,DuckDB::Appender#append_uint8failed. -
DuckDB::Appender#begin_rowdoes nothing. Only returns self.DuckDB::Appender#end_rowis only required. -
bump ruby in CI. use 3.4.2 on MacOS and Ubuntu, 3.4.1 on Windows.
Breaking changes
-
DuckDB::Result#row_count,DuckDB::Result#row_sizeare deprecated. -
DuckDB::Result#use_chunk_each?,DuckDB::Result#use_chunk_each=are deprecated. -
DuckDB::Result#chunk_eachis deprecated. -
DuckDB::Result#eachonly works at first time because duckdb_chunk_each C-API is deprecated. CallingDuckDB::Result#eachtwice or more does not work.ruby result = con.query('SELECT * FROM table') result.each do |record| p record # <= this works fine. end # calling each again does not work. result.each do |record| p record # <= this will not work endIf you prefer to useDuckDB::Result#eachmultiple times, setDuckDB::Result.use_chunk_each = true. But this behavior will be removed in the future release.ruby DuckDB::Result.use_chunk_each = true result = con.query('SELECT * FROM table') result.each do |record| p record # <= this works fine. end # calling each again works. result.each do |record| p record # <= this works fine. end -
DuckDB::Result#streaming?will be deprecated.
1.1.3.1 - 2024-11-27
-
fix to
DuckDB::Connection#querywith multiple SQL statements. Calling PreparedStatement#destroy after each statement executed. -
install valgrind in docker development environment.
1.1.3.0 - 2024-11-10
-
add
DuckDB::PreparedStatement#bind_decimal. (Thanks to @otegami) -
bump duckdb to 1.1.3.
1.1.2.1 - 2024-11-04
-
DuckDB::Connection#queryaccepts multiple SQL statement. -
When multiple SQL statements are given,
DuckDB::Connection#queryreturns the last statement result. -
DuckDB::Connection#querydoes not support multiple SQL statements with bind parameters. If you pass 2 or more argument,DuckDB::Connection#querywill regard first argument as only one SQL statement and the rest as bind parameters. -
add
DuckDB::ExtracteStatements#eachmethod. -
add
DuckDB::ExtracteStatementsImpl#destroymethod. -
add
DuckDB::PreparedStatement#prepare. -
DuckDB::Connection#prepared_statementaccepts block and callsPreparedStatement#destroyafter block executed.con.prepared_statement('SELECT * FROM table WHERE id = ?') do |stmt| stmt.bind(1) stmt.execute end
1.1.2.0 - 2024-10-20
-
bump duckdb to 1.1.2.
-
add
DuckDB::PreparedStatement#destroy. -
DuckDB::Connection#query,DuckDB::Connection#async_query,DuckDB::Connection#async_query_streamcallDuckDB::PreparedStatement#destroyto free the prepared statement immediately (#775, #781).
1.1.1.0 - 2024-10-06
-
bump duckdb to 1.1.1.
Breaking changes
-
drop duckdb v0.10.x.
1.1.0.1 - 2024-09-21
-
add
DuckDB::Connection#prepare.DuckDB::Connection#prepareis an alias ofDuckDB::Connection#prepared_statement.
1.1.0.0 - 2024-09-15
-
drop ruby 3.0.x.
-
bump duckdb to 1.1.0.
-
Add
DuckDB::PendingResult#execute_check_stateto check the state of the pending result. -
Add
DuckDB::PreparedStatement#clear_bindingsto clear all bindings. -
Add
DuckDB::PreparedStatement#param_typeto get the type of the paramerter type. -
The return value is one of the
:invalid,:boolean,:tinyint,:smallint,:integer,:bigint,:utinyint,:usmallint,:uinteger,:ubigint,:float,:double,:timestamp,:date,:time,:interval,:hugeint,:uhugeint,:varchar,:blob,:decimal,:timestamp_s,:timestamp_ms,:timestamp_ns,:enum,:list,:struct,:map,:array,:uuid,:union,:bit,:time_tz,:timestamp_tz. -
Add
DuckDB::PreparedStatement#statement_typeto get the type of the statement. -
The return value is one of the
:invalid,:select,:insert,:update,:explain,:delete,:prepare,:create,:execute,:alter,:transaction,:copy,:analyze,:variable_set,:create_func,:drop,:export,:pragma,:vacuum,:call,:set,:load,:relation,:extension,:logical_plan,:attach,:detach,:multi. -
Add
DuckDB::Result#statement_typeto get the return type of the statement. -
The return value is one of the
:invalid,:select,:insert,:update,:explain,:delete,:prepare,:create,:execute,:alter,:transaction,:copy,:analyze,:variable_set,:create_func,:drop,:export,:pragma,:vacuum,:call,:set,:load,:relation,:extension,:logical_plan,:attach,:detach,:multi. -
Add
DuckDB::Result#return_typeto get the return type of the result. -
The return value is one of the
:invalid,:query_result,:rows_changed,:nothing. -
The following method will be deprecated.
-
DuckDB::Result#use_chunk_each? -
DuckDB::Result#use_chunk_each=
Breaking changes
-
drop duckdb v0.9.x.
-
skip to check duckdb_parameter_name is available.
-
The following methods are obsoleted.
-
DuckDB::Result#_null? -
DuckDB::Result#_to_boolean -
DuckDB::Result#_to_smallint -
DuckDB::Result#_to_utinyint -
DuckDB::Result#_to_integer -
DuckDB::Result#_to_bigint -
DuckDB::Result#_to_hugeint -
DuckDB::Result#_to_hugeint_internal -
DuckDB::Result#__to_hugeint_internal -
DuckDB::Result#_to_decimal -
DuckDB::Result#_to_decimal_internal -
DuckDB::Result#__to_decimal_internal -
DuckDB::Result#_to_float -
DuckDB::Result#_to_double -
DuckDB::Result#_to_string -
DuckDB::Result#_to_string_internal -
DuckDB::Result#_to_blob -
DuckDB::Result#to_value -
DuckDB::Result#row -
DuckDB::Result#use_chunk_each?is always true. -
DuckDB::Result#use_chunk_each=always ignores the argument. -
DuckDB::Result#eachalways works the same asDuckDB::Result#chunk_each.
1.0.0.2 - 2024-06-23
-
DuckDB::Resultsupports TIMESTAMPTZ column type (only when DuckDB::Result.use_chunk_each is true). -
Supporting TIMESTAMPTZ is experimental.
-
DuckDB::Resultsupports TIMETZ column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports TIMESTAMP_NS column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports TIMESTAMP_MS column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports TIMESTAMP_S column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports STRUCT column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports MAP column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports UNION column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports BIT column type (only when DuckDB::Result.use_chunk_each is true).
1.0.0.1 - 2024-06-16
-
support fetch the value from UHUGEINT type column.
-
DuckDB::Resultsupports ARRAY column type (only when DuckDB::Result.use_chunk_each is true). -
DuckDB::Resultsupports LIST column type (only when DuckDB::Result.use_chunk_each is true). Thanks to stephenprater.
1.0.0.0 - 2024-06-08
-
bump duckdb to 1.0.0.
-
add
DuckDB::ExtractedStatementsclass. -
raise error when
DuckDB::ExtractedStatements#newis called with invalid SQL. -
The following public/private methods will be deprecated.
-
DuckDB::Result#streaming? -
DuckDB::Result#_null? -
DuckDB::Result#_to_boolean -
DuckDB::Result#_to_smallint -
DuckDB::Result#_to_utinyint -
DuckDB::Result#_to_integer -
DuckDB::Result#_to_bigint -
DuckDB::Result#_to_hugeint -
DuckDB::Result#_to_hugeint_internal -
DuckDB::Result#__to_hugeint_internal -
DuckDB::Result#_to_decimal -
DuckDB::Result#_to_decimal_internal -
DuckDB::Result#__to_decimal_internal -
DuckDB::Result#_to_float -
DuckDB::Result#_to_double -
DuckDB::Result#_to_string -
DuckDB::Result#_to_string_internal -
DuckDB::Result#_to_blob -
DuckDB::Result.use_chunk_each= -
DuckDB::Result#use_chunk_each?
Breaking changes
-
DuckDB::Result.use_chunk_each is true by default. If you want to use the old behavior, set
DuckDB::Result.use_chunk_each = false. But the old behavior will be removed in the future release.
0.10.3.0 - 2024-05-25
-
bump to duckdb v0.10.3.
0.10.2.0 - 2024-04-20
-
remove version from docker-compose.yml.
-
bump to duckdb v0.10.2.
0.10.1.1 - 2024-03-31
-
fix error using binding with name (issue #612). Thanks to pere73.
0.10.1.0 - 2024-03-22
-
drop duckdb v0.8.x.
-
fix column type failures with duckdb v0.10.1.
0.10.0.0 - 2024-02-18
-
bump to duckdb v0.10.0.
-
fix building error with duckdb v0.10.0.
-
bundle update to bump nokogiri from 1.16.0 to 1.16.2.
-
fix Decimal type conversion.
Breaking changes
-
DuckDB::Connection#query_progressreturnsDuckDB::QueryProgressobject only when duckdb library version is 0.10.0 or later. -
The available methods are
DuckDB::QueryProgress#percentage,DuckDB::QueryProgress#rows_processed,DuckDB::QueryProgress#total_rows_to_process.
0.9.2.3 - 2023-12-29
-
fix bigdecimal warning with Ruby 3.3.0.
0.9.2.2 - 2023-12-26
-
bump Ruby to 3.3.0 on CI.
Breaking changes
-
drop Ruby 2.7.
0.9.2.1 - 2023-12-24
-
support Time column in
DuckDB#Result#chunk_each.
0.9.2 - 2023-11-26
-
add
DuckDB::Connection#async_query_stream. -
DuckDB::PendingResultaccepts second argument. If the second argument is true,PendingResult#execute_pendingreturns streamingDuckDB::Resultobject. -
add
DuckDB::PreparedStatement#pending_prepared_stream -
add
DuckDB::Result#streaming?.
0.9.1.2 - 2023-11-05
-
add
DuckDB::Connection#interrupt,DuckDB::Connection#query_progress. -
add
DuckDB::Connection#async_query, alias methodasync_execute.
0.9.1.1 - 2023-10-29
-
change default branch to main from master.
-
add
DuckDB::PendingResultclass.
Breaking Changes
-
drop duckdb v0.7.x.
0.9.1 - 2023-10-14
-
bump duckdb to 0.9.1.
0.9.0.1 - 2023-10-08
-
DuckDB::Connection#queryaccepts SQL with named bind parameters.
0.9.0 - 2023-09-30
-
bump duckdb to 0.9.0.
Breaking Changes
-
deprecation warning when
DuckDB::Result.eachcalling withDuckDB::Result.use_chunk_eachis false. Theeachbehavior will be same asDuckDB::Result.chunk_eachin the future. setDuckDB::Result.use_chunk_each = trueto suppress the warning. -
DuckDB::Result#chunk_eachreturnsDuckDB::Intervalclass when the column type is INTERVAL.
0.8.1.3
-
Fix BigDecimal conversion.
0.8.1.2
-
Fix BigDecimal conversion when the value is 0. Thanks to shreeve.
0.8.1.1
-
DuckDB::Result#chunk_each supports:
-
UTINYINT
-
USMALLINT
-
UINTEGER
-
UBIGINT
-
fix memory leak of:
-
DuckDB::Result#_enum_dictionary_value -
DuckDB::Result#_enum_dictionary_size -
DuckDB::Result#_enum_internal_type
0.8.1
-
bump duckdb to 0.8.1.
-
add
DuckDB::Result#chunk_each,DuckDB::Result.use_chunk_each=,DuckDB::Result#use_chunk_each?The current behavior ofDuckDB::Result#eachis same as older version. ButDuckDB::Result#eachbehavior will be changed like asDuckDB::Result#chunk_eachin near future release. And there are some breaking changes. WriteDuckdDB::Result.use_chunk_each = trueif you want to try new behavior.DuckDB::Result.use_chunk_each = true result = con.query('SELECT ....') result.each do |record| # <= each method behavior is same as DuckDB::Result#chunk_each ... end
Thanks to @stephenprater.
-
support enum type in DuckDB::Result#chunk_each.
-
support uuid type in DuckDB::Result#chunk_each.
Breaking Changes
-
DuckDB::Config.set_configdoes not raise exception when invalid key specified. Instead,DuckDB::Database.openraisesDuckDB::Errorwith invalid key configuration.
0.8.0
-
bump duckdb to 0.8.0
-
add DuckDB::Result#_to_decimal_internal
-
add DuckDB::Result#_to_hugeint_internal
Breaking Changes
-
DuckDB::Resultreturns BigDecimal object instead of String object if the column type is DECIMAL.
0.7.1
-
bump duckdb to 0.7.1
-
fix docker build error on M1 Mac
0.7.0
-
bump duckdb to 0.7.0
-
fix have_func argument order
-
remove unused variable in test
-
add DuckDB::LIBRARY_VERSION
-
add DuckDB::Result#_to_string_internal
-
add DuckDB::Result#__to_hugeint_internal
-
add DuckDB::Result#__to_decimal_internal
-
add Ruby 3.2.1 on CI test
-
add Ruby mswin on CI test
Breaking Changes
-
drop Ruby 2.6
0.6.1
-
bump Ruby to 3.2.0 on CI
-
fix deprected warning (double_heap is deprecated in GC.verify_compaction_references) with Ruby 3.2.0 on CI
-
bump duckdb to 0.6.1 on CI
-
fix gem install error on M1 MacOS
-
implement
DuckDB.library_version -
use duckdb_value_string instead of duckdb_value_varchar if duckdb_value_string is available.
-
bump Ruby to 3.2.0rc1
-
bump duckdb to 0.6.0
Breaking Changes
-
drop duckdb <= 0.4.x. ruby-duckdb supports duckdb >= 0.5.0
0.5.1.1
-
bug fix: reading the boolean column
0.5.1
-
bump duckdb to 0.5.1
0.5.0
-
update bundle version of Gemfile.lock
-
add ruby ucrt test on Windows
-
use TypedData_Wrap_Struct, TypedData_Get_Struct
-
bump duckdb to 0.5.0
-
fix utf-8 encoding.
-
add DuckDB::Result#row_count, DuckDB::Result#row_size(alias of row_count).
-
add
DuckDB::Result#column_count,DuckDB::Result#column_size(alias of column_count).
Breaking Changes
-
bind_varchar does not raised
DuckDB::Errorwhen the binding column is date or datetime.
0.3.4.0
-
bump duckdb to 0.3.4
0.3.3.0
-
DuckDB::Column#typesupports :decimal. -
bump duckdb to 0.3.3.
-
bump Ruby to 2.6.10, 2.7.6, 3.0.4, 3.1.2.
0.3.2.0
-
bind_time, bind_timestamp, bind_date, bind_timeinterval to
DuckDB::PreparedStatement -
bump duckdb 0.3.2
-
bump Ruby to 3.1.1, add Ruby mingw in CI.
-
bump Ruby to 2.6.9, 2.7.5, 3.0.3 in CI.
BREAKING CHANGE
-
drop duckdb <= 0.2.8
0.3.1.0
-
bump duckdb to 0.3.1 in CI.
-
bump duckdb to 0.3.0 in CI.
-
append_time, append_date, append_timestamp of
DuckDB::Appenderaccept argument having to_str to convert time string.
0.2.9.0
-
breaking change.
-
append_timestamp is called when the argument is Time object.
-
append_date is called when the argument is Date object.
-
-
add
DuckDB::Appender#append_interval. append_interval is expremental. -
refactoring DuckDB::Append#append_hugeint with duckdb v0.2.9
-
test 2 versions of duckdb on github actions macos CI.
-
fix windows CI failes
-
update github actions CI on ubuntu
-
fix to build with duckdb v0.2.9
-
use duckdb_prepare_error when get error message of prepared statement.
0.2.8.0
-
DuckDB::Database.openaccepts 2-nd argument asDuckDB::Configobject. -
add
DuckDB::Config -
bump duckdb to 0.2.8 in CI
-
bump Ruby to 2.6.8, 2.7.4, 3.0.2 in CI
0.2.7.0
-
call duckdb_free after calling duckdb_value_blob, duckdb_value_varchar.
-
bump
DuckDBto v0.2.7 in CI -
rake build on Windows in github actions.
-
There is a issue (LoadError) when running rake test on Windows (in GitHub actions).
0.2.6.1
-
DuckDB::Connection#appenderaccepts block. -
support HUGEINT type.
-
rename PreparedStatement#bind_boolean to PreparedStatement#bind_bool.
0.2.6.0
-
change version policy
-
ruby-duckdb W.X.Y.Z supports duckdb W.X.Y
-
add
DuckDB::Appender -
bump
DuckDBto v0.2.6 in CI. -
remove unnecessary duckdb header file from MacOS CI.
0.0.12
0.0.11
-
fix failure in test_close in test/duckdb_test/database_test.rb because
DuckDBerror message was changed. -
bump DuckDb to v0.2.4
-
add test CI with Ruby 3.0.0
-
add test CI on MacOS.
-
bunp
DuckDBto v0.2.3
0.0.10
-
bump
DuckDBto v0.2.2 -
fix to build failure on MacOS.
0.0.9
0.0.8.1
-
update Gemfile.lock
-
unsupport Ruby 2.4
0.0.8
-
remove test with Ruby 2.4.10
-
bump
DuckDBto v0.1.8 -
bump
DuckDBto v0.1.8 -
bump
DuckDBto v0.1.7 -
current ruby-duckdb supports
DuckDBversion 0.1.5 and 0.1.6 -
support Ruby 2.7.1
-
bump
DuckDBto v0.1.6 -
current ruby-duckdb supports
DuckDBversion 0.1.5 and 0.1.6 -
DuckDB::Connection#connectaccepts block -
DuckDB::Database#connectaccepts block -
DuckDB::Database.openaccepts block -
update duckdb.gemspec, required ruby version >= 2.4.0
0.0.7
-
bump
DuckDBto v0.1.5 -
DuckDBversion must be 0.1.5 or later. -
add
DuckDB::Connection#connect, alias method open -
add
DuckDB::Connection#disconnect, alias method close
0.0.6
-
add alias
executeofDuckDB::Connection#query -
support
duckdb version 0.1.3 -
add
DuckDB:PreparedStatement -
create CI (GitHub Actions / Travis-CI)
-
create database only once in result_test.rb
0.0.5
-
add
DuckDB::Error -
DuckDB::Result#eachconvertDuckDBnumber value to Ruby’s number -
DuckDB::Result#eachconvertDuckDBNULL value to nil -
DuckDB::Result#eachreturns Enumerator object when block is not given -
DuckDB::ResultincludeEnumerable -
add test for
DuckDB::Result -
add test for
DuckDB::Connection -
fix description in duckdb.gemspec
0.0.4
-
add test for
DuckDB::Database -
rename module name to
DuckDBfromDuckdb
0.0.3
-
rename native extension name to duckdb_native
0.0.2
-
fix gem install error
0.0.1
-
first release