Skip to content

Commit

Permalink
Fix liftQueryScalar
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew de Detrich committed Aug 11, 2019
1 parent 9b4f31e commit 8b456a1
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ class ContextInstanceSpec extends Spec {
}
testContext.run(q).extractor(Row("s")) mustEqual Entity(StringValue("s"))
}

"encoding with set" in {
implicit val testToString = MappedEncoding[StringValue, String](_.s)
implicit val stringToTest = MappedEncoding[String, StringValue](StringValue)
case class Entity(x: StringValue)
val q = quote {
query[Entity].filter(e => liftQueryScalar(Set(StringValue("1"))).contains(e.x))
}
testContext.run(q).prepareRow mustEqual Row("1")
}
}
"package-based" - {
import io.getquill.MappedEncoding
Expand Down

0 comments on commit 8b456a1

Please sign in to comment.