pihvi/yesql

syntax error at or near ":"

rockdriven opened this issue · 4 comments

I am being using yesql dependency in layers with aws lambdas working fine, ones I updated the version form "yesql": "^3.2.2" to yesql": "^4.1.0" I got errors and all my inserts broke with syntax error at or near ":"
Using "pg": "^7.17.1"
I returned to the old version thankfully everything works again.
Is any new option or switch I must use in order to upgrade?

I really appreciate this library make our life a lot easier.
Thanks.

pihvi commented

Thanks for the report!
Can you tell how does the SQL query look like for me to reproduce the error?

sure here is a sample:
query = sql("INSERT INTO ksf.mtr (heat, certificate, mill_id, country_id, supplier_id, co_id, item_id, file, etag, fileuuid) VALUES(:ht,:ce,:md,:cd,:si,:co,:it,:fl,:et,:fi) RETURNING *")
({ht: heat, ce: certificate, md: mill_id, cd: country_id, si: 100, co: co_id, it: item_id, fl: filename, et: response.ETag, fi: uuid});

Thanks.

pihvi commented

This is now fixed in release 4.1.1. Can you verify it's working for you?

Sorry for the regression..