3 ms·
This makes sense, I have experience with and lots of appreciation for SQLite. It's exempliry across many areas of software engineering. Elegant simplicity, no
by metadat 4y ago
This makes sense, I have experience with and lots of appreciation for SQLite. It's exempliry across many areas of software engineering. Elegant simplicity, not bloated, high performance, broad API library support, amazing 3rd party ecosystem (rqlite [1], litestream [2]). It's wildly nice!
With that said, I've found that I'm a bit hesitant to use SQLite for anything interactive for one silly reason:
It's so hard to query precise date ranges in an ergonomic way interactively. There is no timestamp type, and the general advice I've seen is to use Unix Epoch offsets. This works fine except for exploring.
I keep finding myself desiring porting my SQLite's to PostgreSQL for only the comparatively easy ranged data exploration.
[1] https://github.com/rqlite/rqlite https://github.com/rqlite/rqlite
[2] https://github.com/benbjohnson/litestream https://github.com/benbjohnson/litestream
- somenameforme 4y agoCan you elaborate on the problem there? I'm confused because as you described it, it seems just something like select * from table where startDate >= 123 and endDate <= 456; would solve the problem.
- petre 4y agoHe has to convert every timestamp into unix epoch.
- piaste 4y agoSQLite supports computed columns, so you could just add a virtual text column next to the 'real' epoch column defined as the date representation of your choice. https://www.sqlite.org/draft/gencol.html https://www.sqlite.org/draft/gencol.html Ignore the text column in your application so it won't be computed at runtime, but it will appear when you 'select *' or use a db browser in exploration mode.