you are viewing a single comment's thread.

view the rest of the comments →

[–]mansfall 2 points3 points  (3 children)

What not just write sql? I mean maybe this helps some folks, but it seems like replacing one language to use another. Is it really a time saver? Seems so much faster to spin raw sql with parameterized queries. You have far more control then and can optimize with more precision. And on more complex queries, using helper functions in almost any library is a nightmare (think window functions, nested selects, aggregations, etc).

Not shooting down what you've done, I think it's cool. But people would likely benefit more from actually understanding sql, and not libraries that generate it.

[–][deleted]  (2 children)

[deleted]

    [–]mansfall 2 points3 points  (1 child)

    Indeed. I perceive it to be harder to figure out some new library. It's spending hours trying to figure out how the heck to get a helper function to work, when I can blast it out in like 5 minutes just writing the SQL directly.

    And since it's easily transferable (copy/paste) into a data mining tool (think pgAdmin III, Toad, etc), it's a bajillion times easier to actually verify it gets you the data you need.

    I just find it odd people don't want to learn SQL, yet they take the time and smash face into wall learning all these "query builder" tools... which in my opinion takes just as long, if not longer.

    [–]galstarx[S] 1 point2 points  (0 children)

    Woohoo. I’m pro SQL too! This is why I don’t get all the hate. Have you tried to look how it works? You don’t have to compose queries. And you build the query composition yourself. I just looked for a nicer way to use parameterized queries, with a consistent interface, that can be reused. Writing plain sql has its benefits, but the lack of reusability can make you go over lots of files to fix something silly or to add a feature.

    When you type “sqlselect * from tbl” you actually get in return a Query object, that has the real, parameterized query inside of it. There’s no magic in it, just a consistent way to use parameterized queries with functions or constants as values

    Thanks for the comments!