Open
Description
As the query results are Any
, how do you suggest deriving types for the values?
For example:
val temperature: Double = record("temperature").asInstanceOf[BigDecimal].toDouble
but that seems nasty. Do you retain the type from the JSON wire format? Any fancy implicit encoders available?
Similarly, how do you advice handling values which may be not there, e.g.
val maybeTemperature: Option[Double] = record("maybeThere") ...
Would be nice, but as it stands I can get NoSuchElementException
when I request something that isn't there.
I had a poke around but couldn't find anything obvious.
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels