You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently bitvec crate supports serde as a optional feature. I would like to see that included in sqlx since I don't want to implement a custom deserializer and serializer for that type.
Describe the solution you'd like
Edit Cargo.toml and add feature "serde" for bitvec crate.
Describe alternatives you've considered
I have tried using the original crate, but since the original type does not support Decode trait in sqlx, I find it difficult to use it.
Additional context
I am relatively new to OSS but I have read the Contributing.md doc. It guided me to make a issue first and then proceed with a PR even though I imagine it's a simple one.
Cargo.toml:
sqlx = { version = "0.7.3", features = ["postgres", "runtime-tokio-rustls", "bit-vec"] }
Postgresql DB Version: 16.1
The text was updated successfully, but these errors were encountered:
This sounds like the one you're actually trying to use. Unfortunately, SQLx doesn't support it.
These are completely separate crates so their types aren't interchangeable.
If you were to switch to the bit-vec crate, all you'd have to do is add it to your own dependencies and enable the serde feature:
bit-vec = { version = "0.6.3", features = ["serde"]}
However, I'll admit that the authors of bitvec appear to have put a lot more work into it, and it's the more recently updated of the two.
The problem is, though, that I don't want to just have support for both because that could lead to a ton of confusion ("wait, am I supposed to be using the bit-vec crate or the bitvec crate?"), and we already have issues with the macros when multiple Rust types are applicable to the same SQL type and they're behind different optional features (#2689).
I wouldn't be against switching from bit-vec to bitvec but that's a breaking change, and an entirely separate discussion.
There just isn't a really good answer here, sorry.
Actually, I apologize for my blunder. I tried to use bitvec crate instead of bit-vec crate. I did not know there were two separate crates, with the same feature flags. Thanks for clearing up the misunderstanding!
Is your feature request related to a problem? Please describe.
Currently bitvec crate supports serde as a optional feature. I would like to see that included in sqlx since I don't want to implement a custom deserializer and serializer for that type.
Describe the solution you'd like
Edit Cargo.toml and add feature "serde" for bitvec crate.
Describe alternatives you've considered
I have tried using the original crate, but since the original type does not support
Decode
trait in sqlx, I find it difficult to use it.Additional context
I am relatively new to OSS but I have read the Contributing.md doc. It guided me to make a issue first and then proceed with a PR even though I imagine it's a simple one.
Cargo.toml:
Postgresql DB Version: 16.1
The text was updated successfully, but these errors were encountered: