You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Temporal and decimal codecs for SQLite and MySQL #90
We want explicit, documented codecs for time and money on SQLite and MySQL:
timestamp: DateTime.Utc. Storage is chosen per table: ISO-8601 text, or integer epoch milliseconds.
date: a calendar date as YYYY-MM-DD text with no time zone.
decimal(p, s): BigDecimal, stored as text on SQLite. It is never a float.
Why (MyRemotely)
274 DateTime columns and 5 Decimal columns.
ADR-0019 in our app: a time tied to a unit uses that unit's time zone, and a calendar date has no zone. The codec must never shift a calendar date.
SQLite has no native types for these. A wrong default here corrupts data quietly during the move.
Part of #52: the CAFE-stack roadmap signal from MyRemotely. This shows the direction we want, and it is not a demand. We can send a PR if you accept the idea.
The SQLite timestamp part landed in #119: SQLite.timestamp maps DateTime.Utc to SQLite's own YYYY-MM-DD HH:MM:SS.SSS UTC text, so it compares correctly with what strftime/datetime write. It refuses values outside years 0000–9999, and #120 adds SQLite.timestampNow. integer refuses values past 2^53. Still open: epoch-millisecond storage, a zoneless date, decimal(p, s), and all of MySQL.
Activity
Makisuo commentedon Oct 25, 2026
The SQLite timestamp part landed in #119:
SQLite.timestampmapsDateTime.Utcto SQLite's ownYYYY-MM-DD HH:MM:SS.SSSUTC text, so it compares correctly with whatstrftime/datetimewrite. It refuses values outside years 0000–9999, and #120 addsSQLite.timestampNow.integerrefuses values past 2^53. Still open: epoch-millisecond storage, a zonelessdate,decimal(p, s), and all of MySQL.