Sorry to hijack the thread, but a side note and not entirely on topic: pgtyped-rescript exists if you’re interested in raw Postgres SQL with type safety in ReScript: GitHub - zth/pgtyped-rescript: pgTyped ReScript - Typesafe SQL in ReScript
pgtyped-rescript will eventually be superseded by a more powerful SQL type generator I’ve been working on that’s a fork/layer on top off of GitHub - wsporto/typesql: TypeSQL - Generate Typescript API from raw SQL. Supports PostgresSQL, MySQL, Sqlite, LibSQL (Turso) and D1 (Cloudflare). That project will be able to handle MySQL and SQLite as well in addition to Postgres for type safety. And it has more advanced analysis than pgtyped-rescript.