rails / arel

A Relational Algebra
2.06k stars 390 forks source link

Migration from 6 to 7 #486

Closed stavskiys closed 7 years ago

stavskiys commented 7 years ago

I working on project which has complex report builder system. The report system based on ours dsl which was written on arel 6. During migration to rails 5 I've got a problem with our dsl. It because there is used arel 7. It is ok, but I can't find wiki or notes about how I can migrate to new version. Which API difference and so on.

For example: Arel::Table "from" method is using without arguments. Do we have some replacement for it ? It was very useful when need to make select from subquery.

arel_table.from(subquery).to_sql => select * FROM (SELECT ... )

Probably some one has more information about it. Please, share for all.

Thanks.

rafaelfranca commented 7 years ago

There is no documentation on how upgrade versions. You will have to look the diffs and the changelogs.

The from method of Table doesn't accept argument anymore because it doesn't make sense to you use a table if you are not going to select from it. If you want to select from a subquery you can build a SelectManager.