Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's fine advice - if you can type check your queries. My colleague wrote a mypy plugin for parsing SQL statements and doing type checking against a database schema file, which helps to identify typos and type errors early: https://github.com/antialize/py-mysql-type-plugin


Raw sql doesn’t compose, so it’s a no go for me except in special cases, but the tool would be a great addition to sqlalchemy.core for when those special cases occur.


Here, go and read about the WITH statement https://modern-sql.com/feature/with


That’s exactly when I write raw sql but being stuck on old Postgres versions has performance implications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: