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
merged 3 commits into from
Mar 16, 2020

Conversation

SimonSchick
Copy link
Contributor

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 CONTRIBUTING.md?

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 added the type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. label Feb 15, 2020
@codecov
Copy link

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
Member

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

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 For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action label Feb 19, 2020
@papb papb added status: awaiting maintainer and removed status: awaiting response For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action labels Feb 20, 2020
@papb papb self-assigned this Feb 20, 2020
@sushantdhiman sushantdhiman merged commit 761158c into master Mar 16, 2020
@sushantdhiman sushantdhiman deleted the fix/allow-null-query-interface branch March 16, 2020 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants