An open API service indexing awesome lists of open source software.

https://github.com/todesking/qb-scalikejdbc

Goal: Platform independent query builder for relational data.
https://github.com/todesking/qb-scalikejdbc

Last synced: 2 months ago
JSON representation

Goal: Platform independent query builder for relational data.

Awesome Lists containing this project

README

          

# QB: Generic query builder

Goal: Framework independent query builder

Current target: Scalikejdbc

```scala
import com.todesking.qb
import com.todesking.qb.QueryInterpolation._

qb.Sql.buildQuery(
table"users"
.where(col"age" eq 20)
.where(col"name" like "Alice%")
.where(col"id" in (table"owners" select(col"user_id")))
)

=> SqlData("SELECT * FROM users WHERE ((age = ? AND name LIKE ?) AND id IN (SELECT user_id FROM owners))",List(20, "Alice%"))
```