I'm probably totally old-fashioned and crazy, but I personally think the SQL code is much more readable and understandable than the arel code that's generated. Why does everybody hate SQL so much that they have to invent their own query language which will eventually evolve to have the same capabilities as SQL but which will look differently, and will be specific to a host language? Sure. There's the issue of SQL inj…
Scuttle – SQL and Arel Editor
11–16 of 16 posts
Re: Scuttle – SQL and Arel Editor
#12Hi all. Arel committer here. This is a very cool application, and I really enjoyed attending (and helping answer questions) at Cameron's RailsConf talk. That being said, I've become increasingly convinced that constructing queries with Arel is a fun exercise, but ultimately not terribly worthwhile for those of us who are just writing applications. There are three reasons I can think of that people write their queries…
Re: Scuttle – SQL and Arel Editor
#13Re: Scuttle – SQL and Arel Editor
#14Hi all. Arel committer here. This is a very cool application, and I really enjoyed attending (and helping answer questions) at Cameron's RailsConf talk. That being said, I've become increasingly convinced that constructing queries with Arel is a fun exercise, but ultimately not terribly worthwhile for those of us who are just writing applications. There are three reasons I can think of that people write their queries…
4: Generating queries that are composable with other queries.
Re: Scuttle – SQL and Arel Editor
#15Earlier quoted context omitted.
Is there any way to use the OR clause in a Rails SQL query without dropping down to Arel? Can't seem to find a way.
Programatically, I mean. For instance, I can call `where` multiple times in a loop to chain AND clauses.
Re: Scuttle – SQL and Arel Editor
#16(Not the best name maybe, there's a long established OSS project named Scuttle already)