Create Room Entity for a Table which has a field with LONG datatype in Sqlite

后端 未结 2 1811
轮回少年
轮回少年 2021-01-01 02:40

App Database has Items table with a column Price with datatype Long. Db Version = 1

CREATE TABLE items (_i         


        
2条回答
  •  佛祖请我去吃肉
    2021-01-01 03:17

    As from the docs SQLITE doesn't support Long, check docs here.

    INTEGER. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.

    However as LONG is 8 byte and INTEGER can also save values of 8 bytes, you can use INTEGER.

提交回复
热议问题