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
171 stars 17 forks source link

Support explain options #31

Closed abraham closed 1 year ago

abraham commented 1 year ago
$ scope.explain(:analyze)
=> DEPRECATION WARNING: The current database adapter, Trilogy, does not support explain options. To remove this warning, the adapter must implement `build_explain_clause(options = [])`.

Ref https://github.com/rails/rails/pull/47043

jhawthorn commented 1 year ago

This might actually be better solved in Rails. build_explain_clause should have been implemented on abstract_mysql_adapter, not mysql_adapter

composerinteralia commented 1 year ago

This adapter was merged into Rails, so that's now certainly the correctly place to address this.

reid-rigo commented 1 year ago

This might actually be better solved in Rails. build_explain_clause should have been implemented on abstract_mysql_adapter, not mysql_adapter

I believe this PR does just that: https://github.com/rails/rails/pull/48112