Skip to content

Preserve bulk create field iterators - #2330

Open
IlyaKhalafi wants to merge 2 commits into
tortoise:developfrom
IlyaKhalafi:fix/bulk-create-field-iterators
Open

IlyaKhalafi wants to merge 2 commits into
tortoise:developfrom
IlyaKhalafi:fix/bulk-create-field-iterators

Conversation

@IlyaKhalafi

Copy link
Copy Markdown
Contributor

Description

This PR fixes generator-based bulk_create field options failing during SQL construction or after .sql(). With this, field names are captured once before validation and reused for previews and execution.

Empty iterators follow the same validation as empty lists.

Motivation and Context

Fixes #2329.

How Has This Been Tested?

make check and 43 focused tests passed. The full SQLite suite passed with 1,986 tests, 149 skips and two expected failures. PostgreSQL and MySQL SQL generation was checked without live databases.

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 21 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 24 untouched benchmarks


Comparing IlyaKhalafi:fix/bulk-create-field-iterators (72c7a54) with develop (abc91d7)

Open in CodSpeed

@IlyaKhalafi
IlyaKhalafi force-pushed the fix/bulk-create-field-iterators branch from 5c13d23 to 72c7a54 Compare October 23, 2026 16:36

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bulk_create exhausts generator-based conflict options

1 participant