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

fix(query-interface): allow passing null for query interface insert #11931

merged 3 commits into from Mar 16, 2020


Copy link

@SimonSchick SimonSchick commented Feb 15, 2020

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in

Description of change

Add null as allowed parameter to insert on queryInterface and adjust return type of bulkInsert to include number as it can be one.

@SimonSchick SimonSchick requested a review from papb Feb 15, 2020
@SimonSchick SimonSchick added the type: typescript label Feb 15, 2020
@SimonSchick SimonSchick force-pushed the fix/allow-null-query-interface branch from 90c5dd4 to c111cda Compare Feb 15, 2020
Copy link

@codecov codecov bot commented Feb 15, 2020

Codecov Report

Merging #11931 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 117ae4e...bb2f45e. Read the comment docs.

@@ -473,7 +473,7 @@ export class QueryInterface {
records: object[],
options?: QueryOptions,
attributes?: string[] | string
): Promise<object>;
): Promise<object | number>;
Copy link

@papb papb Feb 19, 2020

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 😅

Copy link
Contributor Author

@SimonSchick SimonSchick Feb 20, 2020

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?

@papb papb added the status: awaiting response label Feb 19, 2020
@papb papb added status: awaiting maintainer and removed status: awaiting response labels Feb 20, 2020
@papb papb self-assigned this Feb 20, 2020
@sushantdhiman sushantdhiman merged commit 761158c into master Mar 16, 2020
1 of 2 checks passed
@sushantdhiman sushantdhiman deleted the fix/allow-null-query-interface branch Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
status: awaiting maintainer type: typescript
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants