Is it possible to return values that are computed from other db columns? #1264
-
I want to return a column that is the highlighted version of some text. In the SQL select statement it looks like this:
Is it possible to represent this in my I saw the docs for computed fields but don't want to do a second query to get the highlight based on the title. Is there a way to add a computed field that is returned from the db but not a column? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For posterity, I was able to accomplish this with simple computed fields. I used the normal column
And in my SQL select statement:
|
Beta Was this translation helpful? Give feedback.
For posterity, I was able to accomplish this with simple computed fields.
I used the normal column
title
to put the computed database value into, then I did computed resolvers ontitle
andtitleHighlight
to accomplish what I needed.And in my SQL select statement: