Expand description
Flush operation ordering and batching for SQLModel Session.
This module handles writing pending changes to the database in the correct order:
- DELETE child-first (to respect FK constraints)
- INSERT parent-first (to respect FK constraints)
- UPDATE any order (no circular FK assumed)
Operations are batched by table for performance.
Structs§
- Flush
Orderer - Builds a dependency graph and orders operations for flush.
- Flush
Plan - A plan for executing flush operations.
- Flush
Result - Result of a flush operation.
Enums§
- Link
Table Op - A pending link table operation (for many-to-many relationships).
- Pending
Op - A pending database operation.
Functions§
- execute_
link_ table_ ops - Execute a batch of link table operations.