seratch/scalikejdbc — pull request #87 by gakuzzzz (2013-03-03 02:59:49+00:00)
Title: Added SQLSyntax Interpolation for nested interpolation

for conditional branch in SQL

example

```scala
val userId: Option[Int] = None
val users: List[User] = sql"""
select
${u.result.*}
from
${User as u}
${userId.map(id => sqls"where ${u.id} = ${id}") getOrElse sqls""}
order by ${u.id}
"""
.map(rs => User(rs, u.resultName))
.list.apply()

users.size should be(3)
users(0).id should equal(1)
users(1).id should equal(2)
users(2).id should equal(3)
```