Repository navigation
Releases
Releases · tenjin/click_house
v2.2.0
Changed
- #19
config.global_paramsnow also
apply toselect_*and other GET queries, as the README describes; before, only
executeandinsertsent them. Settings there such assession_idor output formats
now affect selects too. Per-requestquery:params toConnection#gettake precedence,
including oversend_progress_in_http_headers - #6 Raise
ClickHouse::DbExceptionfor
failed JSON and CSV queries on ClickHouse 23.5 and later, which raised
JSON::ParserError/Oj::ParseErrorbecause the server sends error text with an
application/jsoncontent type - #25
execute,insertandpost
sendconfig.databaseor thedatabase:argument over a:databasekey in
global_paramsorparams:, as selects already did. Withdatabase: nil, such as in
databasesandcreate_database, they no longer send the:databasefrom
global_params - #21 For a
ResultSetbuilt by hand,
to_ano longer raisesKeyErrorfor a row key that isn't inmeta(it leaves the
value unchanged), and a row missing a column gets that column's cast ofnilinstead of
staying without it, e.g.TypeErrorfor an integer column
Fixed
- #17 Fix
ArgumentErroron every JSON
response when using json gem 3.x. json 3 also rejects unknown or string keys in
config.json_load_options - #18 Fix
NoMethodErrorfor
CGI.parsein the logging middleware when no other gem loads thecgilibrary, e.g.
Faraday 2.14+ with ActiveSupport 8+, or Ruby 4.0
Added
- #24
config.parse_floatsparses JSON
numbers asFloatinstead ofBigDecimaland sends
output_format_json_quote_decimals=1, so Decimal columns arrive as strings and keep
their precision. Off by default.readonly=1users need the setting in their profile - #13
config.adapteralso accepts an
array of a Faraday adapter and its arguments, e.g.config.adapter = [:test, stubs]
Performance
- #20 Cast query results faster by
resolving each column's casters once per result instead of for every value, with
identical results - #21 Skip casting columns whose JSON
values are already the cast result (String, FixedString, UUID, Enum, and Nullable,
LowCardinality or Array of those) - #16 Cast
DateTimeandDateTime64
values faster (about 2x for columns with a time zone) with identical results