Till we get to 100% green tests, here are the before & current test suite stats. YUP! Lot of wins for a few key pressure point fixes. This to me just shows that the patterns we have for the adapter's delegation to our facade objects are working really well since we went from ~5100 errors to ~100 π
This is where most of the work happned for this pull request.
ActiveRecord default translate_exception adapter method assumes that RuntimeError will not fall thru to the catch all StatementInvalid. This is kind of sad since all Aws::RDSDataService::Errors::ServiceError inherit from RuntimeError. In a latter commit we will fully translate all exceptions but we had to completly override the abstract adapters so any RDS client error is wrapped in ActiveRecord's StatementInvalid.
Disconnect state and raising and ActiveRecord::StatementInvalid.
Ensure @connection.ping returns false if connection closed.
Adapter instance #connect works and shares new client from @config.
Disable all batch or multiple statement support.
Mysql2 Namespace
There are a handful of places in the Mysql2 Adapter that call Mysql2:: objects or constant avalues. Most notable were the adapter's batch insert support methods. Thanks to work done above we got most of these automatically, however, just calling out this work/qa is now done too.
BEFORE/AFTER
Till we get to 100% green tests, here are the before & current test suite stats. YUP! Lot of wins for a few key pressure point fixes. This to me just shows that the patterns we have for the adapter's delegation to our facade objects are working really well since we went from
~5100
errors to~100
πConnection Handling
This is where most of the work happned for this pull request.
ActiveRecord default
translate_exception
adapter method assumes thatRuntimeError
will not fall thru to the catch allStatementInvalid
. This is kind of sad since allAws::RDSDataService::Errors::ServiceError
inherit fromRuntimeError
. In a latter commit we will fully translate all exceptions but we had to completly override the abstract adapters so any RDS client error is wrapped in ActiveRecord'sStatementInvalid
.@connection.last_id
for inserts.RDSDataService::Client
client option sanitization.ActiveRecord::StatementInvalid
.@connection.ping
returns false if connection closed.#connect
works and shares new client from@config
.Mysql2 Namespace
There are a handful of places in the Mysql2 Adapter that call
Mysql2::
objects or constant avalues. Most notable were the adapter's batch insert support methods. Thanks to work done above we got most of these automatically, however, just calling out this work/qa is now done too.Documentation
Totally added some more.