Skip to content
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

Consider implementing a version of update! that uses cursors. reducible-update!? #135

Open
camsaul opened this issue Mar 24, 2023 · 1 comment
Labels
enhancement New feature or request low priority new feature under consideration Possible ideas that may be implemented in the future

Comments

@camsaul
Copy link
Owner

camsaul commented Mar 24, 2023

Use a cursor to iterate over matching rows and then use a Clojure function to apply updates. If the fn returns nil (or the original map, with no changes?) then we can skip the update.

We can have similar versions for delete (f can decide to skip the delete?)

The before and after stuff would be easy to implement on top of these.

@camsaul camsaul added enhancement New feature or request under consideration Possible ideas that may be implemented in the future new feature low priority labels Mar 24, 2023
@camsaul
Copy link
Owner Author

camsaul commented Mar 24, 2023

  1. Iterate over matching rows
  2. Apply before-update to row + changes
  3. for each column in the changes, call .updateObject or equivalent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority new feature under consideration Possible ideas that may be implemented in the future
Projects
None yet
Development

No branches or pull requests

1 participant