SNOW-1858339: Support for AbortSignal #487
Labels
enhancement
The issue is a request for improvement or a new feature
status-triage_done
Initial triage done, will be further handled by the driver team
What is the current behavior?
Right now you have to execute the query, get the statement in the response and call
statement.cancel()
when needed. That makes the cancellation more complicated because the client code needs to keep track of statements and have a custom cancellation logic.What is the desired behavior?
I would like to have native support for AbortSignal in Snowflake SDK. That way instead of keeping track of running statements and implementing custom logic for each individual asynchronous thing, the client will just need to create a signal, pass it inside
.execute()
(and any other async operations that needed to be executed in parallel with it) and then abort the signal to stop all the async operations at once.How would this improve
snowflake-connector-nodejs
?AbortSignal is becoming the standard mechanism for cancelling async operations. Most of the asynchronous core Node.js APIs (Events, Streams, Fetch API, Timers Promises API) support it nowadays, and most of the HTTP clients (Axios, Got, Undici to name a few) support it as well.
Adding support for AbortSignal will give users a more convenient way of cancelling running queries and will make snowflake-sdk more standardized with the rest of Javascript ecosystem.
References, Other Background
What is your Snowflake account identifier, if any?
xe29001
The text was updated successfully, but these errors were encountered: