3 ms·
Uh, neither? A good query builder library, though not one that tries to excuse you from knowing actual SQL. If you try writing SQL by hand, you _will_ eventuall
by LaGrange 9y ago
Uh, neither? A good query builder library, though not one that tries to excuse you from knowing actual SQL. If you try writing SQL by hand, you _will_ eventually mess up and introduce SQL injection somewhere.
- djd20 9y agoThis - you really want the best of both worlds. Use an ORM that lets you mix raw sql in where needed, or generate it directly - sqlalchemy.org is a great example of being able to mix and match as needed using the same core library.
- LaGrange 9y agoSQL Alchemy is pretty good at helping you build up complex and dynamic queries. I actually grew into mostly disliking Python, but other languages don't have SQL Alchemy. There are some tools for that in other languages (Squirrel in Go, Arel - the thing backing Active Record), but I've found SQL Alchemy the most comfortable. Access to schema data is something that even I, mostly sceptical of "proper" ORMs, find really useful.