Story: Batch operations

Table of Contents

This page documents a story in Sprint 13. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

Convert save + delete from per-entity loops to atomic batch operations. Single transaction; consolidated response shape.

Status

Field Value
State DONE
Parent sprint Sprint 13
Now Completed 2026-02-28.
Waiting on None.
Next None.
Last touched 2026-02-28

Acceptance

  • save_*_request takes vector; save_*_response returns single outcome.
  • Batch delete uses WHERE IN; atomic across 23 entities.
  • Temporal guard for IAM entities preserves historical rows.
  • Protocol 46.0 (breaking).

Tasks

Task State Start End Description
Add batch support for saves and deletes DONE 2026-05-20 2026-02-28 save_*_request takes std::vector<entity>; save_*_response returns {bool success, std::string message}; delete uses SQL WHERE IN for atomicity across 23 entities in dq / refdata / trading / iam; new save_result.hpp (later removed); temporal guard for tenant_type / tenant_status batch deletes; protocol 46.0 (breaking).

Decisions

Atomic at the batch level
closes partial-write bugs; consumers always see all-or-nothing.
Consistent 3-layer pattern
repository / service / handler all align; future entities follow the shape.

Out of scope

  • Streaming bulk operations.

See also

None.

Emacs 29.1 (Org mode 9.6.6)