Hi all! Multi part question for y'all.
1) In a function where I have a scalar array parameter
p of type
Rep[List[X]], what's the "preferred" way of turning this into a
Query[X, Rep[X], Seq? It isn't just
p.unnest, apparently, which has type
Looking at examples, it looks like
Query(true).map(_ => p.unnest), which does have the right signature (albeit is a little weird).
2) Let's say i have 2 array parameters
p2 of the same cardinality. I want "a zip join of the unnested arrays". Pairs
(a, b) where
p2, where the indices for
b match. How should i do this? Hint - It's not:
Query(true).map(_ => p1.unnest).zip(Query(true).map(_ => p2.unnest))
since this leads to a rather surprising sql behavior (at least on postgres) related to the
ROW_NUMBER function being used for the zip join.
PgDate2Supportis availabe for slick 3.1.1 as an addon, you can use
libraryDependencies += "com.github.tminglei" %% "slick-pg_date2" % "0.14.6"to refer it. But in master for slick 3.2, I merged it into the main jar.
select ARRAY(select stringfield from foos)yet.
When I'm trying to use slick-pg driver (https://pastebin.com/Z3XeXVSJ; as you can see: there is nothing special with it), I get
AbstractMethodError on Scala 2.12.2:
java.lang.AbstractMethodError: Method ru/makkarpov/play/database/DatabaseProfile$MyAPI$.slick$basic$BasicProfile$API$_setter_$Database_$eq(Ljava/lang/Object;)V is abstract
I'm suppose that this is a compiler bug, but I wondered that Googling for this error shows literally nothing.