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

sql: support ActiveRecord through postgresql adapter #12792

Closed
12 of 13 tasks
cuongdo opened this issue Jan 9, 2017 · 7 comments
Closed
12 of 13 tasks

sql: support ActiveRecord through postgresql adapter #12792

cuongdo opened this issue Jan 9, 2017 · 7 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL
Milestone

Comments

@cuongdo
Copy link
Contributor

cuongdo commented Jan 9, 2017

These are the features needed to support ActiveRecord using its postgresql database adapter:

@cuongdo cuongdo added activerecord A-sql-pgcompat Semantic compatibility with PostgreSQL labels Jan 9, 2017
@cuongdo cuongdo changed the title sql: support ActiveRecord's postgresql adapter sql: support ActiveRecord through postgresql adapter Jan 9, 2017
@cuongdo
Copy link
Contributor Author

cuongdo commented Jan 9, 2017

cc @jordanlewis @nvanbenschoten

@jordanlewis
Copy link
Member

After #13429 and a workaround for #13468, we manage to successfully make it past all of ActiveRecord's type management and schema creation routines - rake db:migrate on a fairly complex example works without a hitch. Next step is working through and validating some actual CRUD operations via the ORM.

@jordanlewis
Copy link
Member

So it turns out common table expressions aren't used before Rails/ActiveRecord 5.0, which was released in June 2016. We could probably claim Rails/ActiveRecord 4.2.6 support without too much more work - notably we wouldn't need #7029 or #13156.

@jordanlewis
Copy link
Member

In addition, in order to support Rails 5.0+ without supporting correlated subqueries, we'll need to wait until rails/rails#27743 is released in Rails 5.0.2.

@jordanlewis
Copy link
Member

Once rails/rails#27949 makes it into a release, we won't need common table expressions at all.

@jordanlewis
Copy link
Member

Rails uses savepoints during transactions. Looks like we'll need to support them. Added #10735 to the list.

@cuongdo cuongdo added this to the Q1 2017 milestone Feb 22, 2017
@jordanlewis
Copy link
Member

We changed strategies and now provide an adapter for CockroachDB support in ActiveRecord. See https://github.com/cockroachdb/activerecord-cockroachdb-adapter and the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL
Projects
None yet
Development

No branches or pull requests

2 participants