Data type for money

(TW) #1

Is it safe to use float for storing money? Or is there any equivalent of Java’s BigDecimal?

(Michel Conrado) #2

Yes, but What worries you? (update: Actually technically I was wrong to say that. Isn’t totally safe)

No, but there’s discussion about it.

(TW) #3

I come from Java/MySQL, and usually it’s bad idea to story money value in floating point for reasons mentioned in e.g. and

Do you think it’s different in Dgraph?

(Manish R Jain) #4

Dgraph should support BigInts. There should be an issue for it. If not, feel free to file one. CC: @francesc.

(Michel Conrado) #5

Actually this issue is already there. Anyone interested in this feature please show your support there.
Add more arguments to corroborate and also, give some nice thumbs up :+1:

(system) closed #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.