|
|
|
|
|
by naasking
1002 days ago
|
|
Then your experience doesn't extend to dynamic queries composed of query fragments, which is almost universal to all e-commerce sites. Views are a degenerate, second-class form of query abstraction, as are common table expressions and the numerous other features added to SQL over the years to paper over the lack of proper first-class query abstractions. It's like saying a programming language doesn't need first-class functions because we have disjoint unions and we can perform defunctionalization by hand. Strictly true, but really missing the point. |
|
When viewed through the lens of general purpose imperative or functional programming languages, it's easy to see how it can be seen as falling short.
I'll admit much of the tooling and driver APIs leave a lot to be desired.
Some tools do make good efforts though such as nested fragments in this driver.
https://github.com/porsager/postgres#building-queries