-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix(types): update return type of Model.update
#14155
Conversation
Failing test looks like a random issue unrelated to this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR!
I think we could handle this like Model.count
: have two method signatures:
- one with option.returning set to true that returns
[affectedCount: number, affectedRows: M[]]
- one without option.returning (or set to false) that returns
[affectedCount: number]
Model.update
Also you're right, the sqlite issue is something that started happening randomly recently but unrelated to your PR |
Model.update
Model.update
Co-authored-by: Zoé <zoe@ephys.dev>
That was a great idea. Thank you! I've made the changes and pushed them. LMK what you think. Thanks. |
Co-authored-by: Zoé <zoe@ephys.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think we're good to go :)
Merging another PR first then I'll update & merge this one
Thank you for doing this! You are awesome! 🏆 |
Co-authored-by: Zoé <zoe@ephys.dev> Co-authored-by: Guy Ellis <guy.ellis@walmartlabs.com>
Co-authored-by: Zoé <zoe@ephys.dev> Co-authored-by: Guy Ellis <guy.ellis@walmartlabs.com>
Co-authored-by: Zoé <zoe@ephys.dev> Co-authored-by: Guy Ellis <guy.ellis@walmartlabs.com>
Hi! This should be fixed with #14184 right? That PR will be reviewed soon and then we will release a new version |
I think so, thanks. |
🎉 This PR is included in version 7.0.0-alpha.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Co-authored-by: Zoé <zoe@ephys.dev> Co-authored-by: Guy Ellis <guy.ellis@walmartlabs.com>
Co-authored-by: Zoé <zoe@ephys.dev> Co-authored-by: Guy Ellis <guy.ellis@walmartlabs.com>
Pull Request Checklist
Please make sure to review and check all of these items:
Description Of Change
As per the docs in the type I've updated the type.
A few lines above the change is a description where the update() method can return 2 types. I added the 2nd type.