finagle / finagle/finagle-postgres

Support for where conditions with tuples of values

Open
#161 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
81
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Postgres supports syntax like this: `... WHERE (a, b) in ((1, 2), (3, 4))`
It would be nice to pass Seq of Tuple (or even a case class) as a Param in the query, currently it seems to only work with String.

A test for something like this (for `sql""` syntax) might look something like this:
```scala
"Seq of tuple params for IN operator" in {
val p1 = Seq(("foo", "bar"), ("three", "four"))
expectQuery("SELECT * FROM foo WHERE (a, b) IN (($1, $2), ($3, $4))", "foo", "bar", "three", "four") {
sql"SELECT * FROM foo WHERE a IN ($p1)"
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.