2 ms·
I prefer to use functional frameworks. They 1) express the sql with map, flatmap, filter, groupBy etc functions 2) use classes that are equivalent to tuples. S
by joostdevries 10y ago
I prefer to use functional frameworks. They 1) express the sql with map, flatmap, filter, groupBy etc functions 2) use classes that are equivalent to tuples.
Since I develop in Scala both are very intuïtive to write.
Apparently Linq for F# is really good as well. As someone else mentioned in a comment.
I get a programming interface that doesn't attempt to hide sql and still my code is fully typed. And it's really easy to make your query logic modular: make the sql fragment a function that you can call. Like any other code you reuse.
I can't think of an advantage of ORM over this functional approach. Apart from ORM being more well known.