Conversation
| import java.util.UUID | ||
| import scala.annotation.implicitNotFound | ||
| import scala.jdk.CollectionConverters.* | ||
| sealed trait HBaseType[T] extends Converter[T, Map[String, Array[Byte]], Map[String, Array[Byte]]] { |
There was a problem hiding this comment.
| sealed trait HBaseType[T] extends Converter[T, Map[String, Array[Byte]], Map[String, Array[Byte]]] { | |
| sealed trait HBaseType[T] extends Converter[T, Map[String, Array[Byte]], Map[String, Array[Byte]]] { |
| Map(k -> toBytes(v)) | ||
| } | ||
|
|
||
| // //////////////////////////////////////////////// |
There was a problem hiding this comment.
missing a comment here or is it just intended as a linebreak?
There was a problem hiding this comment.
linebreak as in the other modules
| } | ||
| v.getOrElse(p.default) | ||
| } | ||
| // result is default if all fields are default |
There was a problem hiding this comment.
Unless I'm misunderstanding the construct lambda, it looks like result defaults if even one field is default?
There was a problem hiding this comment.
I copied this from the bigtable module. I don't get either why we use the Value wrapper. I'd see If I can clean that
| primitive[Double](java.lang.Double.BYTES)(_.getDouble)(_.putDouble(_)) | ||
| implicit val hbfBoolean: Primitive[Boolean] = | ||
| from[Byte](_ == 1)(if (_) 1 else 0) | ||
| implicit val hbfUUID: Primitive[UUID] = |
There was a problem hiding this comment.
nice! should we include support for java.time classes as well?
There was a problem hiding this comment.
Maybe in an unsafe package. As there could be several way to store dates (string bytes, ms long bytes, ...), we should not arbitrarily prick one here.
Add
hbasemodule to support conversion fromResultant toPutmutation