This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class ParameterValue[A](aValue: A, statementSetter: ToStatement[A]) { | |
def set(s: java.sql.PreparedStatement, index: Int) = statementSetter.set(s, index, aValue) | |
} | |
case class SimpleSql[T](sql: SqlQuery, params: Seq[(String, ParameterValue[_])], defaultParser: RowParser[T]) extends Sql { | |
def on(args: (Any, ParameterValue[_])*): SimpleSql[T] = this.copy(params = (this.params) ++ args.map { | |
case (s: Symbol, v) => (s.name, v) | |
case (k, v) => (k.toString, v) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comment to get more information during initialization | |
logLevel := Level.Warn | |
// The Typesafe repository | |
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | |
// Use the Play sbt plugin for Play projects | |
addSbtPlugin("play" % "sbt-plugin" % "2.0") | |
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" |