prettynice icon indicating copy to clipboard operation
prettynice copied to clipboard

Database plans

Open blaix opened this issue 11 months ago • 0 comments

Update: gren-ws4sql is shaping up to be not as painful as I thought. I included a decoding/encoding API that's much simpler than json and it's kind of nice to have all that explicit and colocated. So, probably, new plan:

  • [ ] Set up ws4sql and dbmate in pencils
  • [ ] release and document gren-ws4sql
  • [ ] update prettynice example to use gren-ws4sql
  • [ ] add database section to prettynice docs

Old plans (may remove):

Switch gears with gren-ws4sql. Move to prettynice-sql for a more full featured solution. Provide the following:

  • [ ] Low-level API. Basically what I was planning for gren-ws4sql.
  • [ ] Generate query functions from sql like gleam's squirrel.
    • Reference:
      • https://gist.github.com/HParker/6b3eaf0f1b682179c762059b1d53c0ec
      • https://www.youtube.com/watch?v=wQSQV0xzmAk
      • https://www.sqlite.org/pragma.html#pragma_table_info (pragma table_info(table_name))
  • [ ] Can be used standalone, but built-in to prettynice framework with the following:
    • [ ] Automatically find and run migrations with dbmate
    • [ ] Automatically set up and run ws4sql server

Focus on SQL, not a custom query interface or ORM. (ws4sql, squirrel, and dbmate are examples of sticking with this direction).

blaix avatar Feb 08 '25 13:02 blaix