oracle / node-oracledb

Oracle Database driver for Node.js maintained by Oracle Corp.
http://oracle.github.io/node-oracledb/
Other
2.24k stars 1.07k forks source link

error NJS-098 with colons in sql comments since version 6.0.0 #1561

Closed ritschwumm closed 1 year ago

ritschwumm commented 1 year ago

using the new thin driver, colons in comments sometimes seem to be taken as introducing a bind parameter:

select
  1
from
  -- :
  dual
where
  -- :
  1=1

results in

NJS-098: 1 positional bind values are required but 0 were provided

interestingly, neither of the two colons can be removed, or the error disappears

sharadraju commented 1 year ago

Thanks @ritschwumm , Able to reproduce the issue. We will look into it

sharadraju commented 1 year ago

@ritschwumm The patch in lib/thin/statement.js for this issue is now available as indicated by the link above. To apply this patch, simply copy this file to your lib folder and replace the older version. This will be incorporated in the 6.0.1 release.

sharadraju commented 1 year ago

Closing the issue as it is fixed in 6.0.1 release.

ritschwumm commented 1 year ago

thanks a lot :)