Handle float types as well during updates
Combined with silent failures because of async-by-default behavior, this
was _very_ hard to debug.
@@ -66,6 +66,20 @@ func (j *Janusgraph) addClass(k kind.Kind, className schema.ClassName, UUID strf
q = q.Int64Property(janusPropertyName, int64(t))
case int64:
q = q.Int64Property(janusPropertyName, t)
+ case uint:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case uint8:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case uint16:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case uint32:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case uint64:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case float32:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case float64:
+ q = q.Int64Property(janusPropertyName, int64(t))
default:
return fmt.Errorf("Illegal value for property %s", sanitizedPropertyName)
}
@@ -400,6 +414,10 @@ func (j *Janusgraph) updateClass(k kind.Kind, className schema.ClassName, UUID s
q = q.Int64Property(janusPropertyName, int64(t))
case uint64:
q = q.Int64Property(janusPropertyName, int64(t))
+ case float32:
+ q = q.Int64Property(janusPropertyName, int64(t))
+ case float64:
+ q = q.Int64Property(janusPropertyName, int64(t))
default:
return fmt.Errorf("Illegal value for property %s", sanitizedPropertyName)
}
