Skip to content

Add UpdateItem to database service for partial attribute updates - #66

Merged
NitinKumar004 merged 2 commits into
developmentfrom
feature/database-update-item
Mar 29, 2026
Merged

Add UpdateItem to database service for partial attribute updates#66
NitinKumar004 merged 2 commits into
developmentfrom
feature/database-update-item

Conversation

@NitinKumar004

Copy link
Copy Markdown
Collaborator

Summary

  • Adds UpdateItem method to the database driver interface supporting SET (add/overwrite fields) and REMOVE (delete fields) actions
  • Implements across all 3 providers: AWS DynamoDB, Azure CosmosDB, GCP Firestore
  • Wires through portable API layer with metrics, recording, rate limiting, and error injection
  • Emits stream/change feed events on update (MODIFY event with old/new images)
  • Emits provider-native metrics (ConsumedWriteCapacityUnits, TotalRequestUnits, document/write_count)

Closes #58

Test plan

  • TestUpdateItemAWS — SET + REMOVE flow with GetItem verification
  • TestUpdateItemAzure — SET + REMOVE flow with GetItem verification
  • TestUpdateItemGCP — SET + REMOVE flow with GetItem verification
  • TestUpdateItemNotFound — all 3 providers return NotFound for missing items
  • TestUpdateItemTableNotFound — all 3 providers return NotFound for missing tables
  • TestUpdateItemInvalidAction — rejects unsupported action types
  • TestUpdateItemWithStreams — MODIFY stream records emitted with old/new images
  • Linter: 0 issues (golangci-lint run --timeout=9m ./...)
  • Full test suite: all passing (go test ./...)

@NitinKumar004
NitinKumar004 merged commit 45b6238 into development Mar 29, 2026
@NitinKumar004 NitinKumar004 mentioned this pull request Mar 31, 2026
@NitinKumar004
NitinKumar004 deleted the feature/database-update-item branch April 30, 2026 18:16
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.

Add UpdateItem / partial attribute updates to Database service

1 participant