• Hmmmm (unregistered)

    Might be YodaSQL

  • (nodebb)

    I like it. Twice as much WTF for my money today.

  • randy (unregistered)

    I presume jOOQ is an acceptable builder. I'm a fan.

  • Scott (unregistered)

    Perhaps I'm missing something, so please educate me: how is using a SQL builder NOT "just concatenation with extra steps"? I mean, at the end of it all, it's just going to emit the query as a string, right?

  • Hmmmm (unregistered) in reply to Scott

    It checks variable types and escapes/quotes properly.

  • (nodebb) in reply to Scott

    It's all about abstraction levels.

  • (author) in reply to Scott

    I mean, yes, the final output is a string, so at some level, it's going to emit a string of characters, thus making anything "concatenation with extra steps". But, if you have a decent builder API, what it absolutely prohibits is constructing invalid statements: you construct the syntax tree as a data structure, manipulate it, and then only when it goes to the database, do you convert it to SQL. The canonical representation is the syntax, not the string, and it's an exception to construct anything but a valid statement.

Leave a comment on “Build Up”

Log In or post as a guest

Replying to comment #699907:

« Return to Article