suketa / ruby-duckdb

Ruby binding for DuckDB

Home Page:https://github.com/suketa/ruby-duckdb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the value of decimal columns should return BigDecimal not String

suketa opened this issue · comments

the return value of decimal columns is String object.

db = DuckDB::Database.open
con = db.connect
con.query('CREATE TABLE decimals (decimal_value DECIMAL(30,8))')
con.query("INSERT INTO decimals VALUES (1.23456789)")
result = con.query('SELECT decimal_value FROM decimals')
result.first.first #=> Expected: 1.23456789, But "1.23456789"

Expected value should be Decimal object or Float or String ???

commented

@sandstrom
Ooops, yes, BigDecimal not Decimal

commented

Next version will return BigDecimal object.
#484

Great!