Slick language injection

Hi,

I'm trying to set up a SQL language injections for Slick StaticQuery methods.

For example, the signature of a method is as follows:

scala.slick.jdbc.StaticQuery
def query[P, R](query: String)
(implicit rconv: GetResult[R],
                pconv: SetParameter[P]): StaticQuery1[P, R]

My injection configuration is:

+ scalaLiteral().callArgument(0, psiMethod().withName("query").withParameters("java.lang.String", "scala.slick.jdbc.GetResult[R]", "scala.slick.jdbc.SetParameter[P]").definedInClass("scala.slick.jdbc.StaticQuery"))

No luck so far, injection is not properly recognized. Removing implicit parameters from withParameters() clause doesn't work too.

Do you have any hints, how to set up this properly?

1 comment
Comment actions Permalink

For performance reasons language injections was disabled by default (most of users don't need it, however sometimes it caused long typing freezes). We are thinking for now what to do to enable it by default again. Now you need to enable it by yourself.
To enable language injection go Settings -> Scala -> Other settings -> uncheck Disable language injection.

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.