essential-slick icon indicating copy to clipboard operation
essential-slick copied to clipboard

Describe bind

Open d6y opened this issue 9 years ago • 1 comments

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 avatar Aug 08 '16 07:08 d6y

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" = ?)

d6y avatar Aug 08 '16 07:08 d6y