Arel is a SQL AST manager for Ruby.

1. Simplifies the generation of complex SQL queries
2. Adapts to various RDBMS systems

It is intended to be a framework framework; that is, you can build your own
ORM with it, focusing on innovative object and collection modeling as opposed
to database compatibility and query generation.

Homepage:
https://github.com/rails/arel
