Convert Rep[T] to Rep[List[T]]
There presently exists no mechanism to convert a Rep[T] to a Rep[List[T]]; using asColumnOf results in a Postgres error.
Unfortunately, it looks like it will be impossible to get slick to know such a conversion isn't possible at compile time :( But, at least it would be nice to add an implicit toList function to a Rep[T] to convert it accordingly. I think it will require an extension to the Slick query compiler.
I think I have a pretty good idea how to make this work, but you may no better. I'll wait until your response to work on it.
Where to use it? In table definition?
In queries.
Oddly, using ANY does not leverage GIN indices, sadly. In order for it to be used, you need to convert the value to a List, and then do an overlap test.
I had to rewrite a query from ANY to @>, but had a Rep[String]. Ended up going custom SQL on it.
I see. But I haven't a good idea for it. I'll wait for your solution ^^