Skip to content

feat: add bulk delete, update and custom actions to AsyncCrud - #455

Open
d3vyce wants to merge 1 commit into
mainfrom
claude/bulk-operations-feature-g3elzx
Open

d3vyce wants to merge 1 commit into
mainfrom
claude/bulk-operations-feature-g3elzx

Conversation

@d3vyce

@d3vyce d3vyce commented Oct 27, 2026

Copy link
Copy Markdown
Owner

bulk_apply runs an async action on every row whose primary key is in a list of ids; bulk_delete and bulk_update (one patch for every row) are built on it. Rows are loaded in one query in primary key order and changed through the ORM, so lifecycle events, M2M fields and cascades behave as in update and delete.

The default "atomic" mode runs the batch in one transaction. "partial" runs each row in its own savepoint and reports missing ids, ApiException errors and known constraint violations in BulkResult.failed.

Adds the BulkRequest, BulkUpdateRequest, BulkItemError and BulkResult schemas and BulkLimitExceededError for the max_items cap.

@d3vyce d3vyce self-assigned this Oct 27, 2026
@d3vyce
d3vyce force-pushed the claude/bulk-operations-feature-g3elzx branch from 69780fc to 81c2a21 Compare October 27, 2026 17:01
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
src/fastapi_toolsets/crud/factory.py 100.00% <100.00%> (ø)
src/fastapi_toolsets/exceptions/__init__.py 100.00% <ø> (ø)
src/fastapi_toolsets/exceptions/exceptions.py 100.00% <100.00%> (ø)
src/fastapi_toolsets/schemas.py 100.00% <100.00%> (ø)
src/fastapi_toolsets/types.py 100.00% <100.00%> (ø)

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.

2 participants