Hacker News new | ask | show | jobs
by sigseg1v 672 days ago
I think the negative number here refers to the amount of days/etc to subtract (eg. add negative days to subtract, not supply a negative date).

However, at the same time it seems to indicate that it stores data using sqlites built in number type, which to my understanding does not support unsigned? Secondly, the docs mention you can store with a range of 290 years and the precision is nanoseconds, which if you calculate it out works out to about 63 bits of information, suggesting a signed implementation.

1 comments

Yes, it's signed...https://www.sqlite.org/datatype3.html

  Each value stored in an SQLite database (or manipulated by the database engine) has one of the following storage classes:
  # some omitted...
  INTEGER. The value is a signed integer, stored in 0, 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.