Skip to content

Conversation

andrykonchin
Copy link
Member

@andrykonchin andrykonchin commented Aug 12, 2025

Changes:

  • Added description for reading transactions in README.md
  • Improved RDoc comments for transactional and non-transactional persistence and finder methods
  • Added missing specs for transactional and non-transactional persistence methods
  • Changed non-transactional #find and raise MissingHashKey when a given partition key is nil
  • Fixed #save! and raise RecordNotSaved when a callback throws :abort and terminates the process
  • Check whether partition and sort key are specified in the persistence methods and raise a proper exception (MissingHashKey or MissingRangeKey)
  • Fixed #inc , #increment! and #decrement! to not create new item when an item with specified primary key is already deleted
  • Fixed #update_attribute to not raise StaleObjectError when an item with specified primary key is already deleted
  • Fixed #update/#update! to not create new item when an item with specified primary key is already deleted
  • Fixed #where() with condition on a :serialized field to not raise an exception

@andrykonchin andrykonchin force-pushed the ak/transaction-related-improvements branch 3 times, most recently from 5fc64cc to 7b160b3 Compare August 16, 2025 14:11
@andrykonchin andrykonchin force-pushed the ak/transaction-related-improvements branch from 7b160b3 to 9275973 Compare August 16, 2025 14:20
… methods and raise proper exception

Change methods:
- #save/#save!
- create/create!
- #update_attributes/#update_attributes!
- upsert
- update_fields
- #delete
- #destroy/#destroy!

And raise Dynamoid::Errors::MissingHashKey or Dynamoid::Errors::MissingRangeKey correspondingly. Otherwise "Aws::DynamoDB::Errors::ValidationException: Invalid attribute value type>" is raised.
@andrykonchin andrykonchin force-pushed the ak/transaction-related-improvements branch from 9275973 to 681e1f6 Compare August 20, 2025 18:29
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.38%. Comparing base (2a3a9dd) to head (b7cc569).
⚠️ Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #927      +/-   ##
==========================================
+ Coverage   91.92%   92.38%   +0.45%     
==========================================
  Files          76       78       +2     
  Lines        3876     4042     +166     
==========================================
+ Hits         3563     3734     +171     
+ Misses        313      308       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrykonchin andrykonchin force-pushed the ak/transaction-related-improvements branch 2 times, most recently from b7cc569 to 7b86162 Compare August 20, 2025 22:01
@andrykonchin andrykonchin force-pushed the ak/transaction-related-improvements branch from 7b86162 to af7ee78 Compare August 20, 2025 22:10
Copy link

Code Coverage

Package Line Rate Health
dynamoid 92%
Summary 92% (3734 / 4042)

Minimum allowed line rate is 90%

@andrykonchin andrykonchin marked this pull request as ready for review August 21, 2025 20:31
@andrykonchin andrykonchin merged commit 20565ed into master Aug 21, 2025
132 of 133 checks passed
@andrykonchin andrykonchin deleted the ak/transaction-related-improvements branch August 21, 2025 20:32
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.

1 participant