News for hackers. Stuff that matters.
Re:SQLite the only database you will ever need in most cases by elnygren on Thursday April 15, 2021 @03:51AM (#26817376)
Ugh a dynamically typed SQL database, no thanks. I always find I have to build quite a bit of a "data layer" on top of SQLite for example when using it in mobile apps.

Also you have to build some basic stuff yourself like Enum or JSON support. It's not hard but honestly I would feel much better using PostgreSQL in those situations.

Re:SQLite the only database you will ever need in most cases by klysm on Thursday April 15, 2021 @03:53AM (#26817393)
It's not really dynamically typed in the sense that there isn't a schema.
Re:SQLite the only database you will ever need in most cases by elnygren on Thursday April 15, 2021 @04:32AM (#26817673)
However the schema does look like

type schema = { field1: any, field2: any, ... }

AFAIK the column types are not really enforced and you can even leave them out.

https://stackoverflow.com/questions/2489936/sqlite3s-dynamic...

Re:SQLite the only database you will ever need in most cases by CodesInChaos on Thursday April 15, 2021 @04:59AM (#26817923)
AFAIK it's even worse than that. The field types can trigger lossy transformation of the input data, but aren't enforced.

https://www.sqlite.org/datatype3.html#type_affinity

Re:SQLite the only database you will ever need in most cases by shakkhar on Friday April 16, 2021 @02:49AM (#26830448)
Take a look at https://cgsql.dev/. It's supposed to be a lightweight and strict type-checked data layer on top of sqlite.
Re:SQLite the only database you will ever need in most cases by rplnt on Thursday April 15, 2021 @05:00AM (#26817925)
For JSON support, there seems to be an extension:

https://www.sqlite.org/json1.html

Haven't used it, was just wondering if there's something as I found myself quite happy with JSON support in mysql/aurora.