igorkasyanchuk/sql_view

Additional Database adapter support

Open

#1 geöffnet am 15. Feb. 2022

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Ruby (0 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (55 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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.

Contributor Guide