-
-
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(query-interface): allow passing null for query interface insert #11931
Conversation
90c5dd4
to
c111cda
Compare
Codecov Report
@@ Coverage Diff @@
## master #11931 +/- ##
=======================================
Coverage 96.23% 96.23%
=======================================
Files 95 95
Lines 9196 9196
=======================================
Hits 8850 8850
Misses 346 346 Continue to review full report at Codecov.
|
@@ -473,7 +473,7 @@ export class QueryInterface { | |||
records: object[], | |||
options?: QueryOptions, | |||
attributes?: string[] | string | |||
): Promise<object>; | |||
): Promise<object | number>; |
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.
When does it return an object and when does it return a number? And by the way what is this object/number? I couldn't find in the docs 😅
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.
The auto increment index when using mysql.
Apparently this only returns an object under postgres?
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change
Add
null
as allowed parameter toinsert
onqueryInterface
and adjust return type ofbulkInsert
to includenumber
as it can be one.