https://kotlinlang.org logo
#exposed
Title
# exposed
t

tjohnn

02/04/2020, 11:36 AM
Hi, is there a way to select where some raw query match? I am looking for something like E.g
Products.select{ whereRaw("where array_to_string('some_psql_array_column') LIKE '%search%'") }
CC @tapac
I need it for a postgresql query which I think is not supported out of box
Or do I have to completely use raw queries?
s

spand

02/04/2020, 11:51 AM
I think you just need a new function.
👍 1
Take a look at ie.
ExpressionAlias
and its extension:
Copy code
fun <T:Expression<*>> T.alias(alias: String) = ExpressionAlias(this, alias)
t

tjohnn

02/04/2020, 12:30 PM
Thanks, can you provide a link on using ExpressionAlias?
s

spand

02/04/2020, 12:32 PM
Look in the source
t

tjohnn

02/04/2020, 12:34 PM
Okay
6 Views