node-pg-query icon indicating copy to clipboard operation
node-pg-query copied to clipboard

adding support for squel

Open zhardy opened this issue 8 years ago • 0 comments

Squel allows users a programmatic way of generating SQL requests which I've been using in my personal projects. I've also been using pg-query, which is pretty neat!

One of the difficulties has been in trying to use pg-query and Squel together because pg-query just returns the object rather then checking to see if the function toParam exists, which Squel uses. I've tested this edit in a number of my projects and it works fine.

I also changed the text to return a toString rather than just the object so that if the users overwrites toString to include an implementation of a query, it will work rather than just returning an object.

Let me know what you think!

zhardy avatar Mar 06 '17 17:03 zhardy