All notable changes to this project will be documented in this file.
- add
DuckDB::AggregateFunction.create. - add
DuckDB::Appender#clear_columns. - add
DuckDB::Appender#add_column. - add
DuckDB::Appender#clearto discard all unflushed data from the appender without writing it to the table (requires DuckDB >= 1.5.0). - add
DuckDB::Value.create_decimal.
- 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::PreparedStatement#bind_value. - add
DuckDB::Value.create_bool. - add
DuckDB::Value.create_int8. - add
DuckDB::Value.create_int16. - add
DuckDB::Value.create_int32. - add
DuckDB::Value.create_int64. - add
DuckDB::Value.create_uint8. - add
DuckDB::Value.create_uint16. - add
DuckDB::Value.create_uint32. - add
DuckDB::Value.create_uint64. - add
DuckDB::Value.create_null. - add
DuckDB::Value.create_float. - add
DuckDB::Value.create_double. - add
DuckDB::Value.create_varchar. - add
DuckDB::Value.create_blob. - add
DuckDB::Value.create_hugeint. - add
DuckDB::Value.create_uhugeint. - add
DuckDB::Appender#append_value. - 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::AggregateFunction. - add
DuckDB::TableDescriptionto retrieve metadata about a table (with DuckDB >= 1.5.0). - add
DuckDB::ColumnDescriptionto describe a column's name, logical type, and whether it has a default value (with DuckDB >= 1.5.0).
- 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.
- 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.
- 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 of DuckDB short-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.
- 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.
- add
DuckDB.vector_sizeto return the DuckDB vector 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).
- enable
DuckDB::ScalarFunctionwork with duckdb multi threads. - fix mysql_query fails
- bump duckdb to 1.5.0 on CI.
- 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.
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::LogicalType.resolve. - 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 a DuckDB TIMESTAMP_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 a DuckDB timestamp to raw memory. - add
DuckDB::Connection#expose_as_tableto expose a Ruby object as a queryable DuckDB table 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#add_parameter. - add
DuckDB::ScalarFunction#set_return_type. - bump bundler 4.0 in duckdb.gemspec.
- bump duckdb to 1.4.3 on CI.
- 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.
- DuckDB::Connection#appender_from_query accepts block.
- add DuckDB::Connection#appender_from_query.
- add DuckDB::Appender.create_query.
- 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.
- Support TIMESTAMP_S, TIMESTAMP_MS infinity, -infinity value.
- bump duckdb to 1.3.1 on CI.
- drop dcukdb v1.1.x.
- bump duckdb to 1.3.0 on CI.
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. Useasync_queryinstead.
DuckDB::Result#chunk_each,DuckDB::Result.use_chunk_each,DuckDB::Result.use_chunk_each?are deprecated.
- 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.
- 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. - add
DuckDB::PreparedStatement#bind_uhugeint.
- 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.
- add
DuckDB::Appender#error_message. - 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.
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.If you prefer to useresult = 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 end
DuckDB::Result#eachmultiple times, setDuckDB::Result.use_chunk_each = true. But this behavior will be removed in the future release.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.
- fix to
DuckDB::Connection#querywith multiple SQL statements. Calling PreparedStatement#destroy after each statement executed. - install valgrind in docker development environment.
- add
DuckDB::Appender#append_default.
- add
DuckDB::PreparedStatement#bind_decimal. (Thanks to @otegami) - bump duckdb to 1.1.3.
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.
- When multiple SQL statements are given,
- 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
- 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).
- bump duckdb to 1.1.1.
- drop duckdb v0.10.x.
- add
DuckDB::Connection#prepare.DuckDB::Connection#prepareis an alias ofDuckDB::Connection#prepared_statement.
- 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.
- The return value is one of the
- 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.
- The return value is one of the
- 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.
- The return value is one of the
- 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 return value is one of the
- The following method will be deprecated.
DuckDB::Result#use_chunk_each?DuckDB::Result#use_chunk_each=
- drop duckdb v0.9.x.
- skip to check duckdb_parameter_name is available.
- The following methods are obsoleted.
DuckDB::Result#_null?DuckDB::Result#_to_booleanDuckDB::Result#_to_smallintDuckDB::Result#_to_utinyintDuckDB::Result#_to_integerDuckDB::Result#_to_bigintDuckDB::Result#_to_hugeintDuckDB::Result#_to_hugeint_internalDuckDB::Result#__to_hugeint_internalDuckDB::Result#_to_decimalDuckDB::Result#_to_decimal_internalDuckDB::Result#__to_decimal_internalDuckDB::Result#_to_floatDuckDB::Result#_to_doubleDuckDB::Result#_to_stringDuckDB::Result#_to_string_internalDuckDB::Result#_to_blobDuckDB::Result#to_valueDuckDB::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.
- DuckDB::Result supports TIMESTAMPTZ column type (only when DuckDB::Result.use_chunk_each is true).
- Supporting TIMESTAMPTZ is experimental.
- DuckDB::Result supports TIMETZ column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports TIMESTAMP_NS column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports TIMESTAMP_MS column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports TIMESTAMP_S column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports STRUCT column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports MAP column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports UNION column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports BIT column type (only when DuckDB::Result.use_chunk_each is true).
- support fetch the value from UHUGEINT type column.
- add
DuckDB::Appender#append_uhugeint. - DuckDB::Result supports ARRAY column type (only when DuckDB::Result.use_chunk_each is true).
- DuckDB::Result supports LIST column type (only when DuckDB::Result.use_chunk_each is true). Thanks to stephenprater.
- bump duckdb to 1.0.0.
- add
DuckDB::ExtractedStatementsclass. - add
DuckDB::ExtractedStatements#size. - add
DuckDB::ExtractedStatements#prepared_statement. - 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_booleanDuckDB::Result#_to_smallintDuckDB::Result#_to_utinyintDuckDB::Result#_to_integerDuckDB::Result#_to_bigintDuckDB::Result#_to_hugeintDuckDB::Result#_to_hugeint_internalDuckDB::Result#__to_hugeint_internalDuckDB::Result#_to_decimalDuckDB::Result#_to_decimal_internalDuckDB::Result#__to_decimal_internalDuckDB::Result#_to_floatDuckDB::Result#_to_doubleDuckDB::Result#_to_stringDuckDB::Result#_to_string_internalDuckDB::Result#_to_blobDuckDB::Result.use_chunk_each=DuckDB::Result#use_chunk_each?
- 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.
- bump to duckdb v0.10.3.
- remove version from docker-compose.yml.
- bump to duckdb v0.10.2.
- fix error using binding with name (issue #612). Thanks to pere73.
- drop duckdb v0.8.x.
- fix column type failures with duckdb v0.10.1.
- 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.
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.
- The available methods are
- fix bigdecimal warning with Ruby 3.3.0.
- bump Ruby to 3.3.0 on CI.
- drop Ruby 2.7.
- support Time column in
DuckDB#Result#chunk_each. - add
DuckDB::Interval#eql?.
- 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?.
- add
DuckDB::Connection#interrupt,DuckDB::Connection#query_progress. - add
DuckDB::Connection#async_query, alias methodasync_execute.
- change default branch to main from master.
- add
DuckDB::PendingResultclass. - add
DuckDB::PendingResult#state. - add
DuckDB::PendingResult#execute_task. - add
DuckDB::PendingResult#execute_pending. - add
DuckDB::PreparedStatement#pending_prepared.
- drop duckdb v0.7.x.
- add
DuckDB::PreparedStatement#parameter_name. - bump duckdb to 0.9.1.
- add
DuckDB::PreparedStatement#bind_parameter_index. DuckDB::Connection#queryaccepts SQL with named bind parameters.
- bump duckdb to 0.9.0.
- 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.
- Fix BigDecimal conversion.
- Fix BigDecimal conversion when the value is 0. Thanks to shreeve.
- DuckDB::Result#chunk_each supports:
- UTINYINT
- USMALLINT
- UINTEGER
- UBIGINT
- fix memory leak of:
DuckDB::Result#_enum_dictionary_valueDuckDB::Result#_enum_dictionary_sizeDuckDB::Result#_enum_internal_type
- 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.Thanks to @stephenprater.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
- support enum type in DuckDB::Result#chunk_each.
- support uuid type in DuckDB::Result#chunk_each.
- DuckDB::Config.set_config does not raise exception when invalid key specified. Instead, DuckDB::Database.open raises DuckDB::Error with invalid key configuration.
- bump duckdb to 0.8.0
- add DuckDB::Result#_to_decimal_internal
- add DuckDB::Result#_to_hugeint_internal
- DuckDB::Result returns BigDecimal object instead of String object if the column type is DECIMAL.
- bump duckdb to 0.7.1
- fix docker build error on M1 Mac
- 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
- drop Ruby 2.6
- 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
- add DuckDB::PreparedStatement#bind_hugeint_internal
- 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
- drop duckdb <= 0.4.x. ruby-duckdb supports duckdb >= 0.5.0
- bug fix: reading the boolean column
- bump duckdb to 0.5.1
- 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#enum_dictionary_values
- 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).
- bind_varchar does not raised DuckDB::Error when the binding column is date or datetime.
- bump duckdb to 0.3.4
- DuckDB::Column#type supports :decimal.
- bump duckdb to 0.3.3.
- bump Ruby to 2.6.10, 2.7.6, 3.0.4, 3.1.2.
- 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.
- drop duckdb <= 0.2.8
- bump duckdb to 0.3.1 in CI.
- bump duckdb to 0.3.0 in CI.
- append_time, append_date, append_timestamp of DuckDB::Appender accept argument having to_str to convert time string.
- add DuckDB::Appender#append
- breaking change.
- append_timestamp is called when the argument is Time object.
- append_date is called when the argument is Date object.
- breaking change.
- add DuckDB::Appender#append_timestamp.
- add DuckDB::Appender#append_interval. append_interval is expremental.
- add DuckDB::Result#rows_changed
- 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.
- add DuckDB::Appender#append_date
- add DuckDB::Appender#append_time
- DuckDB::Database.open accepts 2-nd argument as DuckDB::Config object.
- 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
- call duckdb_free after calling duckdb_value_blob, duckdb_value_varchar.
- bump DuckDB to 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).
- add DuckDB::PreparedStatement#bind_int8
- DuckDB::Connection#appender accepts block.
- add DuckDB::Appender#append_row.
- support HUGEINT type.
- add DuckDB::Appender#append.
- rename PreparedStatement#bind_boolean to PreparedStatement#bind_bool.
- add DuckDB::Connection#appender.
- change version policy
- ruby-duckdb W.X.Y.Z supports duckdb W.X.Y
- add DuckDB::Appender
- bump DuckDB to v0.2.6 in CI.
- remove unnecessary duckdb header file from MacOS CI.
- add DuckDB::Connection#prepared_statement.
- bump DuckDB to v0.2.5
- support BLOB type (with DuckDB version 0.2.5 or later)
- fix failure in test_close in test/duckdb_test/database_test.rb because DuckDB error message was changed.
- bump DuckDb to v0.2.4
- add test CI with Ruby 3.0.0
- add test CI on MacOS.
- bunp DuckDB to v0.2.3
- bump DuckDB to v0.2.2
- fix to build failure on MacOS.
- bump DuckDB to v0.2.1
- bump Ruby to v2.7.2
- bunmp DuckDB to v0.2.0
- update Gemfile.lock
- unsupport Ruby 2.4
- remove test with Ruby 2.4.10
- bump DuckDB to v0.1.8
- bump DuckDB to v0.1.8
- bump DuckDB to v0.1.7
- current ruby-duckdb supports DuckDB version 0.1.5 and 0.1.6
- support Ruby 2.7.1
- bump DuckDB to v0.1.6
- current ruby-duckdb supports DuckDB version 0.1.5 and 0.1.6
- DuckDB::Connection#connect accepts block
- add DuckDB::Connection#connect
- DuckDB::Database#connect accepts block
- DuckDB::Database.open accepts block
- update duckdb.gemspec, required ruby version >= 2.4.0
- bump DuckDB to v0.1.5
- DuckDB version must be 0.1.5 or later.
- add DuckDB::Connection#connect, alias method open
- add DuckDB::Connection#disconnect, alias method close
- add DuckDB::Database#close
- 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
- add
DuckDB::Error DuckDB::Result#eachconvert DuckDB number value to Ruby's numberDuckDB::Result#eachconvert DuckDB NULL value to nilDuckDB::Result#eachreturns Enumerator object when block is not givenDuckDB::ResultincludeEnumerable- add test for
DuckDB::Result - add test for
DuckDB::Connection - fix description in duckdb.gemspec
- add test for
DuckDB::Database - rename module name to
DuckDBfromDuckdb
- rename native extension name to duckdb_native
- fix gem install error
- first release