Hacker News new | past | comments | ask | show | jobs | submit login

> SQL query strings compose very badly

Can you explain? I have no problem and have used or written my own SQL composition libraries pretty easily. It is code-composition, no doubt, but the BNF for SQL is very easy to grok even given the variations in platform.




Raw SQL is terrible when you need something a bit complicated. Want to do a complex search? Unfortunately, your coworker forgot an " AND " in a little-used function, which is going to blow up on you at runtime. Or maybe you didn't count the placeholders right and you inserted the wrong numbers values. Can you make that work for you with a library? Sure. But on its own, it's just bad.

On the other hand, SQLAlchemy's query API is quite nice, and composes just fine.


SQLAlchemy Core provides a rather decent DBAL for that, so you might not have to write your own libraries, while you don't have to use an ORM.




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

Search: