Skip to content

Conversation

@jwoertink
Copy link
Member

Ref #415

This PR starts the work to make Avram a little more agnostic. Supporting alternate DBs like MySQL, or SQLite would still present a very hefty challenge since there's not a lot of people that contribute to this library, and I only use postgres. However, we've already had a few issues where CockroachDB differs from postgres even though it's uses the postgres protocol. With this change, we can now at least do something like

if AppDatabase.settings.engine.cockroachdb?
  exec("cockroach query")
else
  exec("postgres query")
end

A ton of things would need massive refactoring and thought before trying to support any non-postgres related DB like the PG.connect_listen or using PQ::Notification , etc.. I'll worry about those later.

For now, the big benefit is Avram::Credentials is now just a thing wrapper around URI so we no longer need to handle complex building logic.

… new placeholder idea Engine to support alternate engines. We can now start changing code for Cockroach specific cases. Ref #415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants