underscoreio / essential-slick

Essential Slick Pandoc Source
https://underscore.io/books/essential-slick/
39 stars 8 forks source link

Describe bind #125

Open d6y opened 8 years ago

d6y commented 8 years ago

Sometimes you see code examples containing v.bind. What is bind, when would you use it?

e.g., q0 = as.filter(_.id === 42.bind).length

d6y commented 8 years ago
scala> messages.filter(_.id === 1L).result.statements
res10: Iterable[String] = List(select "sender", "content", "id" from "message" where "id" = 1)

scala> messages.filter(_.id === 1L.bind).result.statements
res11: Iterable[String] = List(select "sender", "content", "id" from "message" where "id" = ?)