edgedb-rust
edgedb-rust copied to clipboard
`Queryable` is not implemented for all `Value` variants
Describe the bug A clear and concise description of what the bug is.
Please implement Queryable for all Value variants. In my particular case, Value::Bytes(_) does not have Queryable implemented for it, and for many other variants as well.
Reproduction
#[derive(Queryable)]
struct SomeStruct {
data: Bytes, // Error, Bytes implements QueryArg, but not Queryable
}
Expected behavior A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem.
I expect all values that can go into a query should be able to come out as a result. Value itself also does not have Queryable implemented, only QueryResult, so you can't use Value as a field of a struct to work around this issue. The only workaround I can think of is to return the data in JSON and parse it out the other side, which works, but is far from ideal.
Versions (please complete the following information):
- OS:
- EdgeDB version:
- EdgeDB CLI version:
- Rust compiler version:
- Cargo version:
- EdgeDB Rust versions: 0.6.1
Additional context Add any other context about the problem here.
I've run into this issue as well.
Bytes should implement DecodeScalar I can create a PR to fix this.
It seems that Range also doesn't include implement Queryable but I'm not sure how to represent it.
Ranges can be represented with edgedb_protocol::model::Range.
Ranges can be represented with
edgedb_protocol::model::Range.
I'm aware, I'm just not sure how to create the Queryable implementation for it.