suharev7 / clickhouse-rs

Asynchronous ClickHouse client library for Rust programming language.
MIT License
324 stars 121 forks source link

feat: add Into<Value> implementations for DateTime<Utc>, Uuid, bool #141

Closed rubik closed 3 years ago

rubik commented 3 years ago

Actually they are From implementations, but they are the same thing, I find this title more readable.

The reason I propose this change is that I had to find out myself how to implement those by looking at the library's code (especially for Uuid, which I got wrong initially). It would be convenient if the library implemented them directly.

If you agree, I can add implementations for Date<Utc> for example. I also added a conversion for bool, since it seems there's only way to convert it: to an u8 (documentation).

These new tests succeed. On my computer, three other tests fail, but they were failing before I made the changes.

suharev7 commented 3 years ago

Thanks a lot.