More liberal use of helpers
kbrock opened this issue · 2 comments
Short version:
Can we be more liberal with helper methods (e.g.: lower
) and mix them into all nodes?
This will allow more invalid sql to be generated, but also allow more forms of valid sql as well.
Longer form of the same question?
Helper methods (e.g.: lower
) are available on some node, but not available on others.
Due to this reason, I am finding myself relying upon these helper methods less and less and coding the more verbose version Arel::Nodes::NamedFunction.new("lower", [...])
throughout my code.
Example:
Arel::Nodes::Grouping.new(...).lower
will not work with Arel.
Would like to hear people's thoughts on the matter before I put in too much effort here.
/cc @matthewd thanks
I'm noticing a number of outstanding issues that are asking for implementation of various dsl helpers in places that weren't originally intended.
I don't think we should allow these helpers in nodes where it will generate invalid SQL. If it is going to generate valid SQL I'm fine to include. I guess this is what is implemented right now.