add Aurora serverless (data api) driver #866
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.