Skip to content

feat: migrate bulkInsertQuery & insertQuery to ts - #16988

Draft
lohart13 wants to merge 6 commits into
sequelize:mainfrom
lohart13:insert-ts
Draft

lohart13 wants to merge 6 commits into
sequelize:mainfrom
lohart13:insert-ts

Conversation

@lohart13

@lohart13 lohart13 commented Jan 24, 2024 •

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description Of Change

Migrates bulkInsertQuery & insertQuery to typescript.
Also fixes Db2 and SQLite returning options for insert and update (SQLite only) statements.

SQLite has had bigint support disabled which will be a breaking change.

Todos

  • Look at using Tedious bulkLoad for mssql.

@lohart13

Copy link
Copy Markdown
Contributor Author

Due to the sqlite3 package returning bigint's as JS numbers, the SQLite tests are always going to fails.

The better-sqlite3 does support bigint, is it worth switching to this package?

I notice there has been some discussion in #11400, is it worth taking this forward now?

@WikiRik

WikiRik commented Jan 24, 2024

Copy link
Copy Markdown
Member

Due to the sqlite3 package returning bigint's as JS numbers, the SQLite tests are always going to fails.

The better-sqlite3 does support bigint, is it worth switching to this package?

I notice there has been some discussion in #11400, is it worth taking this forward now?

The current plan was to look into supporting both adapters in v8 when we split dialects from core. So we would have @sequelize/sqlite3 and @sequelize/better-sqlite3 packages. I don't think we'll need to revisit this for v7, we already have enough breaking changes for users.

I think for this PR it is fine if we disable bigints for sqlite, with a mention to TryGhost/node-sqlite3#1058 (or the related PR 1501 or related issue 922 which was opened by a former sequelize maintainer)

@lohart13
lohart13 marked this pull request as ready for review January 24, 2024 23:17
@lohart13

Copy link
Copy Markdown
Contributor Author

Due to the sqlite3 package returning bigint's as JS numbers, the SQLite tests are always going to fails.
The better-sqlite3 does support bigint, is it worth switching to this package?
I notice there has been some discussion in #11400, is it worth taking this forward now?

The current plan was to look into supporting both adapters in v8 when we split dialects from core. So we would have @sequelize/sqlite3 and @sequelize/better-sqlite3 packages. I don't think we'll need to revisit this for v7, we already have enough breaking changes for users.

I think for this PR it is fine if we disable bigints for sqlite, with a mention to TryGhost/node-sqlite3#1058 (or the related PR 1501 or related issue 922 which was opened by a former sequelize maintainer)

Ok, makes sense.
I've disabled BIGINT support for SQLite which should allow the tests to pass.

@lohart13
lohart13 force-pushed the insert-ts branch 3 times, most recently from 9791df0 to 4fe4828 Compare February 1, 2024 22:41
@lohart13
lohart13 force-pushed the insert-ts branch 2 times, most recently from a2c0e18 to 17fa3fd Compare February 8, 2024 08:50
@ephys

ephys commented Feb 10, 2024 •

Copy link
Copy Markdown
Member

There is some common changes between this PR and the update PR. Would you prefer I focused on review this one first, or the other one? A lot of the legacy code I'd like to clean up applies to both PRs

@lohart13 lohart13 mentioned this pull request Feb 12, 2024
4 of 5 tasks
@lohart13

Copy link
Copy Markdown
Contributor Author

There is some common changes between this PR and the update PR. Would you prefer I focused on review this one first, or the other one? A lot of the legacy code I'd like to clean up applies to both PRs

Focus on #17063.

@sequelize-bot sequelize-bot Bot added the conflicted This PR has merge conflicts and will not be present in the list of PRs to review label Apr 10, 2024
@lohart13 lohart13 mentioned this pull request Oct 17, 2024
4 of 5 tasks
@sequelize-bot
sequelize-bot Bot marked this pull request as draft October 26, 2026 00:26
@sequelize-bot

sequelize-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Warning

This pull request has been automatically converted to draft because it is not ready to be merged.

Reason(s):

  • 🔀 Merge conflicts — This PR has merge conflicts that must be resolved before it can be merged.

Once you have addressed the issue(s) above, you may
mark this pull request as ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicted This PR has merge conflicts and will not be present in the list of PRs to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants