trilogy-libraries / activerecord-trilogy-adapter

Active Record adapter for the Trilogy database client for Rails v6.0 - v7.0.
https://github.com/trilogy-libraries/trilogy
MIT License
172 stars 17 forks source link

Rely on AbstractMysqlAdapter's `#raw_execute` #29

Closed adrianna-chang-shopify closed 1 year ago

adrianna-chang-shopify commented 1 year ago

The only specialization with Trilogy's #raw_execute is adjusting the conn's query flags based on changes to the timezone. We extracted syncing timezone changes to a separate method in https://github.com/rails/rails/commit/dc8c0865722e8b3192d4ff4658f4b6c74a40040c.

Relying on the upstream implementation also allows us to utilize the SQL warnings feature that shipped in https://github.com/rails/rails/pull/46690.

adrianna-chang-shopify commented 1 year ago

cc @eileencodes -- this will be necessary for us to migrate to Trilogy, since we won't raise on SQL warnings otherwise.