9 karma · joined Mar 3, 2023 (3y ago) · 7 submissions
comment 3y ago · link · parent
I don't use jsonb with migrations. My migration files look like
migrations/1645698230_create_orders.sql create table orders (.... );
migrations/164595623_setup_some_trigger.sql create trigger...
--------
In response to "Elimination of boilerplate to load data from a table into a type"
Unrelatedly to migrations, when working with postgres, I use postgres'json capabilites to get nice nested structures that I can convert to any other language easily (or even send it to the browser if serving a webpage). Instead of using tabular responses, I get json structures _directly_ from postgresql.
Very often I just write SQL queries that return a single row with a single json/jsonb field that has the whole JSON response to be served to a web endpoint. Basically I write most if not all my webservice in SQL. And I just have a very thin layer of a server language to work as a proxy between a frontend application and my database application (written in SQL).
comment 3y ago · link · parent
My whole setup is a few lines of code. A very small library covering the first two, a small script for the third one.
5.
Ask HN: A manager to get me interviews?
3 points · by pilotdeveloper · 3y ago · 1 comment
comment 3y ago · link · parent