Hi, is there a way to select where some raw query ...
# exposed
t
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
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
Thanks, can you provide a link on using ExpressionAlias?
s
Look in the source
t
Okay