Hacker News new | ask | show | jobs
by ioquatix 1848 days ago
Also, it turns out the `pg` is also partially non-blocking. But AR may need to improve their connection pool implementation.
1 comments

Does DB::Postgres work with ActiveRecord out of the box? The github page doesn’t mention anything about rails/AR. It also doesn’t seem like a super active project…
Nope, they are totally different. However, the DB gem is an interface/driver similar to PHP's PDO, while AR is a set of drivers, interfaces and high level ORM interfaces. In theory, one could probably use DB as a driver under AR. One person even basically uses AR to generate SQL and then executes it with the DB gem, which I thought was pretty clever.