Also not quite related but if you want to try something new you can use Bun’s SQL API with rescript-bun; here’s an example. (Under the hood the bindings do something very similar to what you did)
Bun’s SQL API is heavily inspired by Postgres.js, so they look and feel almost identical with the advantage that Bun has alot more bindings already written in a single package.
Give it a try, you might like it