hiddentao/squel — pull request #34 by mtsr (2013-08-23 16:18:09+00:00)
Title: Added toParam() for use with e.g. node-postgres' parameterized queries

I've done some initial work on adding a toParam() function that produces a { text: '', values: [] } object for use with for example node-postgres' parameterized queries.

I've included tests for my changes, although I'm not familiar enough with the project to ensure complete coverage. I also changed the WhereBlock tests slightly because neither parameterized where's nor IN was being tested.

Documentation still needs to be done, but I didn't feel that was useful before discussing the functionality itself.

I still have to actually test this with node-postgres, but I'd love some feedback on this, that's why the pull-request already.

I haven't programmed CoffeeScript before, so there might be some javascript-isms in there, please feel free to point those out as well.