def apply()

in bijection-finagle-mysql/src/main/scala/com/twitter/bijection/finagle_mysql/MySqlConversions.scala [72:79]


    def apply(b: Boolean) = ByteValue(if (b) 1 else 0)
    override def invert(t: ByteValue) =
      t match {
        case ByteValue(0) => Success(false)
        case ByteValue(1) => Success(true)
        case ByteValue(x) =>
          Failure(new RuntimeException(s"Cannot cast ByteValue holding $x to Boolean"))
      }