News for hackers. Stuff that matters.
Re:Go and SQLite in the Cloud by nileshtrivedi on Wednesday December 07, 2022 @01:00PM (#33897716)
I'd like to avoid writing boilerplate CRUD code. Is there an equivalent of PostgREST but for SQLite? Essentially, a standard binary would read the schema metadata, and generate standard CRUD APIs: https://postgrest.org/en/stable/api.html

The APIs can even support authentication and authorization with the help of JWT tokens. SQLite may not have row-level security, but even a convention (eg: if a row has user_id column, the JWT must have the same user_id value to get access to a row) would go a long way.

Re:Go and SQLite in the Cloud by iccananea on Wednesday December 07, 2022 @04:44PM (#33900725)
Not exactly what you want, but I've been using https://sqlc.dev to generate hydration code from SQL queries and loving it!
Re:Go and SQLite in the Cloud by LVB on Wednesday December 07, 2022 @02:20PM (#33898894)
I've not use this myself, but Ben Johnson's https://github.com/benbjohnson/postlite in front of SQlite might allow you to use PostgREST? I recall him saying on a podcast that his goal was to be able to point the large ecosystem of PG tools at SQlite.
Re:Go and SQLite in the Cloud by 0cf8612b2e1e on Wednesday December 07, 2022 @01:54PM (#33898504)
A long way off from PostgREST, but you might be able to hack together something sort of similar with Datasette [0] and the new JSON api. Not out of the box at all, but the potential is there to get a similar product.

[0]: https://datasette.io/

Re:Go and SQLite in the Cloud by nileshtrivedi on Wednesday December 07, 2022 @03:01PM (#33899435)
AFAIK, Datasette only offers read-only APIs.
Re:Go and SQLite in the Cloud by 0cf8612b2e1e on Wednesday December 07, 2022 @03:09PM (#33899553)
Re:Go and SQLite in the Cloud by mjay23 on Wednesday December 07, 2022 @07:29PM (#33902446)
Re:Go and SQLite in the Cloud by Cwizard on Wednesday December 07, 2022 @03:19PM (#33899679)
Have you tried pocketbase?