Storing currency values in SQLite3

前端 未结 5 1358
萌比男神i
萌比男神i 2020-12-15 22:26

I\'m dealing with lots of different currencies in my application, and I want to know what the \"best\" way is to store them in an SQLite3 database.

I\'m leaning towa

5条回答
  •  难免孤独
    2020-12-15 22:44

    best currency DataType is BigDecimal and in sqlite you can store it as a VARCHAR field

    ormlite convert BigDecimal to string when you store it.

    ormlite doc for BigDecimal

提交回复
热议问题