-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Issue 366 #376
Merged
Fixes Issue 366 #376
Commits on Apr 12, 2024
-
Initial fix, prior to understanding logical issue with
update
, `pat……ch`, and `upsert`. The operations `update`, `patch`, and `upsert` will need to change their current behavior when encountering a `false` value from `condition`. In that case, these operations will actually need to `delete` the `pk` and `sk` for that index.
Configuration menu - View commit details
-
Copy full SHA for 7b0ff33 - Browse repository at this point
Copy the full SHA 7b0ff33View commit details -
Solidifies new
condition
logicThe condition callback will be invoked only when a composite attribute associated with an index is set via an update, patch, or upsert. [existing behavior] The condition callback is provided the attributes being set on that particular operation, including the item's identifying composite attributes. [existing behavior] If the condition callback returns true, ElectroDB will attempt to create the index and all of its associated keys. If an index cannot be created because an update operation only has enough context for a partial key, ElectroDB will throw. [the original issue here, fixed] If the condition callback returns false, the index and all of its associated keys will be removed from the item. [new behavior] Item #1 above is the key to solving the issue you bring up in your first comment, and it's actually what we do currently. This means that condition would only be called when an index must be recalculated. furthermore, as described in #3, ElectroDB will actually throw if your update operation (set and remove) lacks a full composite context and would result in a "partial" key. This would mean that all * -> true transitions are already validated to have all the composite parts necessary to recreate the complete index already.
Configuration menu - View commit details
-
Copy full SHA for 3e84618 - Browse repository at this point
Copy the full SHA 3e84618View commit details
Commits on Apr 19, 2024
-
Checkpointing initial pass at new condition tests, tests not passing.
Configuration menu - View commit details
-
Copy full SHA for b7d5e6f - Browse repository at this point
Copy the full SHA b7d5e6fView commit details
Commits on Apr 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8bb7bac - Browse repository at this point
Copy the full SHA 8bb7bacView commit details -
Configuration menu - View commit details
-
Copy full SHA for d669625 - Browse repository at this point
Copy the full SHA d669625View commit details
Commits on Apr 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0268faf - Browse repository at this point
Copy the full SHA 0268fafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1855463 - Browse repository at this point
Copy the full SHA 1855463View commit details -
Configuration menu - View commit details
-
Copy full SHA for a764a6d - Browse repository at this point
Copy the full SHA a764a6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 658e6a1 - Browse repository at this point
Copy the full SHA 658e6a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d5bf8e - Browse repository at this point
Copy the full SHA 1d5bf8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 955dc27 - Browse repository at this point
Copy the full SHA 955dc27View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e47188 - Browse repository at this point
Copy the full SHA 3e47188View commit details -
Configuration menu - View commit details
-
Copy full SHA for e79518f - Browse repository at this point
Copy the full SHA e79518fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 87521c4 - Browse repository at this point
Copy the full SHA 87521c4View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.