Ah, the monthly “do you need an ORM" thread.

Please organize yourselves in two equal-height piles around “yes” and “no”, and then a third minuscule one around “the hell do I know, it’s your use case and your code”.

See you again in a few weeks!

All I really want is inference for queries, like the JetBrains IDEs kinda do it.

I can write something like this (pseudocode):

  username = '31337'
  result = db.query('SELECT username, email FROM users WHERE username = 1?', username)
And it would automatically show annotations for `result`, straight from the database:

  result?: {
    username: string,
    email?: string
  }
This is pretty much the idea behind sqlc, with some extra steps of course. You write your SQL queries in file, and it generates type safe bolierplate for you.

https://github.com/kyleconroy/sqlc