Skip to content

Instantly share code, notes, and snippets.

@deusaquilus
Last active February 10, 2022 22:48
Show Gist options
  • Save deusaquilus/3355b8e41a0323d14852164fb52291b9 to your computer and use it in GitHub Desktop.
Save deusaquilus/3355b8e41a0323d14852164fb52291b9 to your computer and use it in GitHub Desktop.
ProtoQuill on Ammonite
// This will download ammonite and put into /usr/local/bin. Command is `amm3`, if you already have `amm` it won't be affected
// sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/2.5.2/3.1-2.5.2) > /usr/local/bin/amm3 && chmod +x /usr/local/bin/amm3' && amm3
import $ivy.`io.getquill::quill-sql:3.16.3.Beta2.3`
// https://repo1.maven.org/maven2/io/getquill/quill-sql_3/3.16.3.Beta2.3/quill-sql_3-3.16.3.Beta2.3.pom...
// import $ivy.$
import io.getquill._
// import io.getquill._
val ctx = new SqlMirrorContext(PostgresDialect, Literal)
// ctx: SqlMirrorContext...
import ctx._
// import ctx._
case class Person(name: String, age: Int)
// defined class Person
run(query[Person]).string
// res13: String = "SELECT x.firstName, x.lastName, x.age, x.blah FROM Person x"
@deusaquilus
Copy link
Author

That's odd, 3.16.3.Beta2.3 should be working fine with java 17. What was the error?
Also did you need to import something besides io.getquill._ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment