-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Aurora serverless (data api) driver #866
Conversation
_tls-native-tls = [ "rusoto_core/native-tls", "rusoto_rds_data/native-tls" ] | ||
_tls-rustls = [ "rustls", "webpki", "webpki-roots", "rusoto_core/rustls", "rusoto_rds_data/rustls" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this causes the deps to be included, even if "aurora" isn't. It seems there is a rustlang tracking issue for weak dependencies that could solve this, but isn't ready yet. Is there another workaround so we don't have 2 feature gates for aurora... "aurora-native-tls" / "aurora-rustls"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cross-reference: rust-lang/cargo#8818
relates to #177 |
this will be used to execute the correct sql for migrations.
@tarkah, As we discussed on Discord, I'm going to close this for now. I definitely appreciate the effort here though. When we're ready to accept these kinds of drivers as part of 0.5+, I'll reach out to you. |
Sounds good! |
Hey! I chimed in the other day on Discord about an Aurora serverless driver. I've mostly got my head around how things are done in core, so I took a stab at making it. This is using the
rusoto_rds_data
library under the hood and so it works fundamentally different to the other drivers and is pretty lightweight in comparison.I've tested what I've got so far and it works with
query_as
. I've only implemented Encode / Decode on string types so far, but the others should be easy to add. Figured I'd post a draft as soon as possible to get any feedback.A few things I'm unsure how to tackle or haven't finished yet:
Exectuor
for this connection. This is the one thing I really don't have my head around, along with caching the statements.AuroraArugments
before submitting with the appropriate named arguments from the query.TransactionManager
and think I'm pushing / popping them correctly. What I don't know is if the way I'm referencing thelast
stored id inAuroraConnection::run
is correct in conjunction with peoplebegin
ing transactions, executing, etc.ExecuteStatementRequest
BatchExecuteStatementRequest
with the data api when array parameters are bound to the query. For things likeUPDATE
statements.LIMIT
forfetch_one
with this data apiI hope this is somewhat on the right track! Would love any feedback or directional changes needed to better accommodate the fact we are using this "rds data api" under the hood and it's limitations.