playframework/playframework — pull request #3493 by cchantep (2014-10-09 15:43:10+00:00)
Title: Refactor SqlQuery case class: backport #3027

Refactor SqlQuery case class as trait with companion object, so that it will be possible better check its creation. Update BatchSql, which was directly using SqlQuery at creation, replacing it by raw (string) statement, with SqlQuery created internally with checks.

```scala
import anorm.BatchSql

// Before
BatchSql(SqlQuery("SQL")) // No longer accepted (won't compile)

// Now
BatchSql("SQL")
// Simpler and safer, as SqlQuery is created&validated internally
```