playframework/playframework — pull request #2285 by cchantep (2014-01-19 22:33:37+00:00)
Title: ToSql and sequence support

Add intermediate SQL preparation level with new `ToSql[A]` trait. It allows to rewrite query with Anorm placeholder (e.g. `{param}`) in case parameter need more that `?` in statement passed to `java.sql.PreparedStatement`.
- For basic/single value parameter, Anorm placeholder is replaced by `?`.
- For parameter `Seq[A]`, Anorm placeholder is replaced by `?, ?, ...` (`?` for each sequence item separated by `, `).
- For custom sequence formatting, wrapper case class `SeqParameter[A]` can be used to specify text before/after each item, along with the sequence.