Closed matgott closed 1 month ago
Looking at the code I can see that BaseStatement
still has the cancel
method but the types are not exposing that so using typescript this won't work:
connection.execute({
sqlText: "",
binds: [],
streamResult: true,
complete: (err, statement) => {
if (err) statement.cancel(); // I GET TS ERROR Property 'cancel' does not exist
}
})
hi and thank you for reporting this issue. seems to be a valid concern indeed. we'll fix it.
PR in progress at https://github.com/snowflakedb/snowflake-connector-nodejs/pull/851
PR is now merged and will be part of the next release
released with Snowflake Node.JS driver v1.12.0
Please answer these questions before submitting your issue. In order to accurately debug the issue this information is required. Thanks!
What version of NodeJS driver are you using? 1.11.0
What operating system and processor architecture are you using? Ubuntu 20.04.3 LTS 64bits
What version of NodeJS are you using? node 16.20.2 npm 8.19.4
What are the component versions in the environment (
npm list
)?5.Server version: xxx
With the previous version I was able to do
statement.cancel()
. Now with version 1.11.0cancel
method is not available in the Statement typesRawStatement | FileAndStageBindStatement
Being able to cancel a statement