feat(query): ignore system attributes _id/_time/_version when matching#466
feat(query): ignore system attributes _id/_time/_version when matching#466SAY-5 wants to merge 1 commit into
Conversation
|
@SAY-5 Hi there! Your branch name " |
edmoffo
left a comment
There was a problem hiding this comment.
Diff matches the analysis in #460: attrs carries symbol keys throughout, so passing symbols to except removes the system attributes that the docstrings already promised would be skipped. Regression tests cover both if_absent and just_one, and CI is green.
bibonix
left a comment
There was a problem hiding this comment.
The change in both if_absent.rb and just_one.rb passes symbol keys (:_id, :_time, :_version) to Hash#except instead of strings, which matches the symbol-keyed attrs hash and actually strips the system attributes from the match query as the docstrings already promised. The two regression tests cover both helpers and both end up at the right place: if_absent returns nil when only the system attribute differs, and just_one returns the existing fact. CI is green.
|
@bibonix Hey! Nice work on that review 👍 You snagged +10 points this time: started with the base +18 but lost -8 since no comments were posted during the review. Just so you know, you could've maxed out at +24 points if there were more comments and hits-of-code involved - something to keep in mind for next time! Your running score is now +400, so don't forget to check your Zerocracy account too. |
|
@edmoffo Great work on the review! 🎉 You've earned +10 points (+18 base, -8 for missing comments). Your current score is +70 - keep building momentum! Check your Zerocracy account for more details. |
Closes #460. The
exceptcall inif_absentandjust_oneused string keys whileattrsis keyed by symbols, so the system attributes were never stripped from the match query. This passes symbols toexceptand adds regression tests for both helpers.