I am writing a ruby gem for which the next unknown database needs to be created in a simple query: sqlite, mysql, postgrescale .
Now I am using ActiveRecord to handle this addictive, but looks a bit heavy for me because I do not use 99% of ActiveRecord power
I want something to play in the next path:
connection = AbstractConnection.new ("adapter", "database" {, "Username", "userpass"} ) Connection.query ("select from table")
Is there any gem that is the essence of making connections for a different adapter? Is it ActiveRecord a good idea?
If you do not want to use ActiveRecord, you can use it:
The ActiveRecord provides a very good DSL in the whole database, but if you do not If you want to invest some time in choosing one of the above, then
If you think that you want to change the database type in the future, then I suggest that you Abuse in ActiveRecord: Your code will remain the same and the underlying framework instead of the database type of deal.
Hope it helps!
Comments
Post a Comment