1

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 := "Pop"

version := "1.0"

lazy val `pop` = (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"  
Ryan Stull
  • 1,056
  • 14
  • 35

1 Answers1

1

From Quill quotation introduction:

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(ctx.query...). Failure to resolve ctx.run looks like an IDE problem to me: try to actually build the project.

Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
  • ctx does not appear as a valid name for me. I am using quill 1.0.0 for cassandra. I still get the quote as undefined. – leco Nov 29 '16 at 21:53
  • You need to create `ctx` first. For Cassandra, see http://getquill.io/#contexts-cassandra-contexts. – Alexey Romanov Nov 30 '16 at 14:09