51
SQL Has Problems. We Can Fix Them: Pipe Syntax In SQL
(research.google)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
In Clojure,
->
is used for inserting the piped argument at the head position in the arguments of whatever it is passed to, while->>
is used for inserting it at the tail. This approach is great for working with immutable data in a series of approachable transformations, which I believe is one reason why so many Domain-Specific Languages for generative programming are written in that language, aside from its interactive REPL. Additionally, there is no need to worry about excessive copying, as this is generally well optimized.This can be particularly useful with HoneySQL, which is more of a DSL for SQL rather than a typical ORM tool. For example: