sql_view icon indicating copy to clipboard operation
sql_view copied to clipboard

Additional Database adapter support

Open tarellel opened this issue 4 years ago • 1 comments

I really like the idea of this project. But something to consider is it is built to be Postgres specific.

You'd easily be able to able to support other database adapters by moving all the RAW SQL statements to an adapters specific folder /lib/sql_view/adapters

So you could have postgres.rb, mysql.rb, sqlserver.rb, oracle.rb, sqlite3.rb

There may be a better method, but you can easily pull an applications primary database adapter with: ActiveRecord::Base.configurations[Rails.env.to_sym][:adapter]

That why you'd have a direct reference on which database adapter you'd need to pull in for the application.

tarellel avatar Feb 15 '22 15:02 tarellel

Hi @tarellel yeap :) I know how to check the current adapter and etc

I just don't have other DB's and I think the regular view will work in most DB's. As for others, I'm ready to see a PR from you or other contributors. Just too busy with other upcoming gems.

igorkasyanchuk avatar Feb 15 '22 16:02 igorkasyanchuk