ClickHouse / clickhouse-rs

Official pure Rust typed client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
314 stars 87 forks source link

Support for `Int256` #52

Open gd87429 opened 1 year ago

gd87429 commented 1 year ago

Wasn't sure whether to comment on https://github.com/loyd/clickhouse.rs/issues/48 or not. Do you have any suggestions on how to handle Clickhouse's Int256 in Rust?

gd87429 commented 1 year ago

@loyd There's convenient U256 and I256 here btw.

loyd commented 1 year ago

These wrappers are convenient, but ethers_core is much bigger than just numeric types.

gd87429 commented 1 year ago

@loyd You're right, it is much bigger. If not integrate these types into this lib, any advise on how to use outside of the lib?

loyd commented 1 year ago

You can implement Serialize and Deserialize (either by creating a custom wrapper type or using serde(with) attribute) in similar way as U256 in https://github.com/loyd/clickhouse.rs/issues/48.