clickhouse.rs icon indicating copy to clipboard operation
clickhouse.rs copied to clipboard

Support for `Int256`

Open gd87429 opened this issue 1 year ago • 4 comments

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 avatar Dec 10 '22 22:12 gd87429

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

gd87429 avatar Dec 22 '22 12:12 gd87429

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

loyd avatar Jan 03 '23 07:01 loyd

@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?

gd87429 avatar Jan 03 '23 16:01 gd87429

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.

loyd avatar Jan 04 '23 05:01 loyd