Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1508219: In type of StatementOption, complete should be optional #860

Closed
etienne-collibra opened this issue Jun 27, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@etienne-collibra
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

After upgrading to 1.11.0 I got a type error cause by a missing complete callback. This callback was optional in @types/snowflake-sdk (link). Looking at the code the callback seems indeed optional.

Here is the diff that solved my problem:

diff --git a/node_modules/snowflake-sdk/index.d.ts b/node_modules/snowflake-sdk/index.d.ts
index 7d494f7..3d5ce77 100644
--- a/node_modules/snowflake-sdk/index.d.ts
+++ b/node_modules/snowflake-sdk/index.d.ts
@@ -491,7 +491,7 @@ declare module 'snowflake-sdk' {
 
     export interface StatementOption {
         sqlText: string;
-        complete: StatementCallback;
+        complete?: StatementCallback;
 
         /**
          * The requestId is for resubmitting requests.

This issue body was partially generated by patch-package.

@github-actions github-actions bot changed the title In type of StatementOption, complete should be optional SNOW-1508219: In type of StatementOption, complete should be optional Jun 27, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Jun 27, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

hi - thank you for the detailed error description! indeed looks to be optional and apparently wasn't addressed in #851 either. we'll look.

@sfc-gh-dszmolka sfc-gh-dszmolka added bug Something isn't working status-triage_done Initial triage done, will be further handled by the driver team labels Jun 27, 2024
sfc-gh-dszmolka added a commit that referenced this issue Jun 27, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

#861

@sfc-gh-dszmolka sfc-gh-dszmolka added the status-pr_pending_merge A PR is made and is under review label Jun 27, 2024
sfc-gh-dszmolka added a commit that referenced this issue Jun 27, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Jun 27, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

fix is now merged and will be part of the next release. Thank you again for your contribution!

@sfc-gh-dszmolka
Copy link
Collaborator

released with Snowflake Node.JS driver v1.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants