def toString()

in storehaus-mysql/src/main/scala/com/twitter/storehaus/mysql/ValueMapper.scala [69:84]


  def toString(value: Value): Option[String] = {
    value match {
      case IntValue(v) => Some(v.toString)
      case LongValue(v) => Some(v.toString)
      case RawValue(_, _, _, v) => Some(new String(v)) // from byte array
      case ShortValue(v) => Some(v.toString)
      case StringValue(v) => Some(v)
      // finagle-mysql text protocol wraps null strings as NullValue
      // and empty strings as EmptyValue
      case EmptyValue => Some("")
      case NullValue => None
      // all other types are currently unsupported
      case other => throw new UnsupportedOperationException(
        s"${value.getClass.getName} with value $other is currently not supported.")
    }
  }