Skip to content

Instantly share code, notes, and snippets.

View xjboybaldomero's full-sized avatar

xjboybaldomero

View GitHub Profile
@cvogt
cvogt / gist:d9049c63fc395654c4b4
Created May 17, 2014 20:04
This code implements a facility for Slick 2.0 to inject custom SQL instead of the Slick produced SQL to be used when running a query
import scala.slick.lifted.{TableQuery => _}
import scala.slick.ast._
import scala.slick.driver._
import scala.language.implicitConversions
/** Extends QueryInvoker to allow overriding used SQL statement when executing a query */
trait OverridingInvoker extends JdbcDriver{
// get the extended QueryInvoker into the .simple._ implicits
override val Implicit: Implicits = new Implicits
override val simple: Implicits with SimpleQL = new Implicits with SimpleQL