by jwr · 15y ago · 0 comments
SQL is already a declarative query DSL, why not just use it? Putting another declarative layer on top buys you little (syntactic sugar for most libraries, this one additionally seems to deal with one-to-many relations, and I hope that support is read-write, not just read-only) — and isolates you from the database below.
In every serious application I've worked on there was a need to use something which the DSL did not support. So why do it at all?
For example, if your PERSON entity has TITLE, FIRST_NAME and LAST_NAME fields, that little bit of logic that concatenates them together in the right way to form a full name is something that is useful to define. Likewise, setting up a join of tables that is used many times in your application is something that Korma will let you do.
Even though these components may be implementable on the database side (as user defined functions or views), it may not always be possible (or desirable) to do that way.