Alexey Romanov
Alexey Romanov

Reputation: 170723

Adding calculated column to query result in Korma

How do I do the equivalent of

SELECT *, id=1 AS calc_column FROM table

in Korma? (Obviously, id=1 is just a simple example).

Upvotes: 3

Views: 290

Answers (1)

Ankur
Ankur

Reputation: 33637

Korma has sqlfn which can be used in fields as show here. If even that doesn't fit your need then you always have the raw function to feed in raw sql in main query.

Upvotes: 7

Related Questions