feat(spanner): support directed reads#5446
Conversation
| pub use crate::from_value::{ConvertError, FromValue}; | ||
| pub use crate::key::{Key, KeyRange, KeySet, KeySetBuilder}; | ||
| pub use crate::model::DirectedReadOptions; | ||
| pub use crate::model::directed_read_options; |
There was a problem hiding this comment.
@dbolduc I would like your opinion on this: DirectedReadOptions contains multiple nested options. Should we expose the module like this? The advantage being that any potential new option that is added to the module in the future will automatically also be exposed? Or should we explicitly list the nested options?
We would want to expose all nested options as it is today, and I also do not foresee any options that we might add in the future that we would not want to expose here.
There was a problem hiding this comment.
to expose here
Here is not the right place.
We can expose them in a pub mod crate::model instead of from the mod crate::client.
Do you only want to expose a subset of the types in the generated mod model? You can pick and choose things to export in the src/lib.rs. src/storage/src/lib.rs might be inspiring.
Also, there are generator options to skip generating a message or RPC. I think there is also an option to generate a message as pub(crate) if it is only used internally. (We can also add new generator options if needed).
With that being said, there is not any maintenance burden associated with exposing a generated model type we don't use in our API. It is just ideal not to do that.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5446 +/- ##
=======================================
Coverage 97.74% 97.74%
=======================================
Files 216 216
Lines 47549 47559 +10
=======================================
+ Hits 46477 46488 +11
+ Misses 1072 1071 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add support for setting DirectedReadOptions for SQL statements and read operations.
aeaf064 to
a334694
Compare
Add support for setting DirectedReadOptions for SQL statements and read operations.