apla / node-clickhouse

Yandex ClickHouse driver for nodejs
MIT License
217 stars 50 forks source link

result value type is wrong #51

Closed peaksnail closed 4 years ago

peaksnail commented 4 years ago

hi

when the result include Int type, the value will be string but not number

any options to handle it?

thanks

nezed commented 4 years ago

This is a usual behavior for [U]Int64 in any case for any DBMS. This happens because JS had only Number (Float64) type, which has only 53 significand precision bits.

For now you must convert numbers by yourself. I recommend you to use the new ES feature BigInt.

I think it will be great to add BigInt conditional support into client itself, so PR welcome