Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Database adapter support #1

Open
tarellel opened this issue Feb 15, 2022 · 1 comment
Open

Additional Database adapter support #1

tarellel opened this issue Feb 15, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@tarellel
Copy link

tarellel commented Feb 15, 2022

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.

@igorkasyanchuk
Copy link
Owner

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 igorkasyanchuk added the help wanted Extra attention is needed label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants