Currently this gives me an error:
SELECT * FROM table WHERE field LIKE '%$1%'
Saying:
bind message supplies 1 parameters, but prepared statement "" requires 0
How do you go about using prepared statements with LIKE? Not sure if I'm missing something, didn't see it in docs. Thanks again! This library is working out great BTW.
Glad the library's working out well for you.
Line #45
https://github.com/brianc/node-postgres/blob/master/test/integration/client/api-tests.js
client.query('SELECT * FROM band WHERE name LIKE $1 ORDER BY name', ['the %'], assert.calls(function(err, result) {...
Is that what you are looking for?
yes, thank you, that worked, knew there was a way :)
Most helpful comment
Glad the library's working out well for you.
Line #45
https://github.com/brianc/node-postgres/blob/master/test/integration/client/api-tests.js
Is that what you are looking for?