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.
In a table which has both partition key and sort key, rustc doesn't raise errors if I forget to call sort_key(...) method to pass sort key.
Describe the solution you'd like
raiden-derive could generate more precise signatures like fn get(&mut self, key: (K, K)) where K: IntoAttribute + Send instead of fn get(&mut self, key: impl IntoAttribute + Send) base on given definition of the struct.
I want to reduce repeat by defining an abstract type for keys. This means that the type consists of impl IntoAttribute and (impl IntoAttribute, impl IntoAttribute). If I define the abstract type using enum, it looks like below.
Is your feature request related to a problem? Please describe.
In a table which has both partition key and sort key, rustc doesn't raise errors if I forget to call
sort_key(...)
method to pass sort key.Describe the solution you'd like
raiden-derive
could generate more precise signatures likefn get(&mut self, key: (K, K)) where K: IntoAttribute + Send
instead offn get(&mut self, key: impl IntoAttribute + Send)
base on given definition of the struct.Want to discuss
client.get(2020)
yields compile errors => Strict type checking of keys #47Abstract Key
In
batch_get
op, there are lots of conditional code generations like below.https://github.com/raiden-rs/raiden/blob/94a77a238405acca7a048d397a6347297b7768b1/raiden-derive/src/ops/batch_get.rs#L73-L90
I want to reduce repeat by defining an abstract type for keys. This means that the type consists of
impl IntoAttribute
and(impl IntoAttribute, impl IntoAttribute)
. If I define the abstract type using enum, it looks like below.However, this is annoying in its representation.
So finally, I stopped this approach.
The text was updated successfully, but these errors were encountered: