I'm strugling with gocql and decimal values in cassandra... I have following table:
CREATE TABLE example.example (
timestamp timestamp,
value_dec decimal,
PRIMARY KEY....
Based on gocql docu decimal is mapped as inf.Dec, but I always got following error:
"can not unmarshal decimal into inf.Dec"
Can anybody help?
var timestamp time.Time
var value_dec inf.Dec
res:= session.Query(`SELECT timestamp, value_dec FROM example.example LIMIT 3 ALLOW FILTERING`).WithContext(ctx).Iter().Scanner()
for res.Next() {
err = res.Scan(×tamp, &value_dec)
if err != nil {
log.Fatal(err)
}
}