Ryan Stull Ryan Stull - 1 year ago 64
Scala Question

Scala quill "quote" not resolving

I'm trying to write database queries with quill for scala. (Quill)

I'm following what they're doing on quill's website but for some reason I cannot resolve the 'quote' method and a few others.

Any ideas?

enter image description here

Here's my build.sbt:

name := "Populace"

version := "1.0"

lazy val `populace` = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.7"

libraryDependencies ++= Seq( jdbc,cache,ws,specs2 % Test,
"org.postgresql" % "postgresql" % "9.4.1208",
"io.getquill" % "quill-core_2.11" % "0.8.0",
"io.getquill" %% "quill-jdbc" % "0.8.0")

unmanagedResourceDirectories in Test <+= baseDirectory ( _ /"target/web/public/test" )

resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"

Answer Source

"To create quotations, first create a context instance. Please see the context section for more details on the different context available." So use import ctx._ before calling quote, as documentation does, or ctx.quote. Failure to resolve ctx.run looks like an IDE problem to me: try to actually build the project.