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

feat(storage): allow record in watch callback #342

Closed
wants to merge 2 commits into from
Closed

Conversation

dvlden
Copy link

@dvlden dvlden commented Nov 16, 2023

πŸ”— Linked issue

#341

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

It provides flexibility in what the watch callback can return, when changes are detected.
Sometimes it can be highly useful to get both the key and the value of the property that was changed. I guess sometimes it can be used for some additional properties too.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

I did not find in the docs any mentions of what callback must be defined as.

@pi0
Copy link
Member

pi0 commented May 1, 2024

Hi. I appreciate your work on this PR mostly non of storage driver watchers get the value on watch event nor this PR adds support for any driver.

We can do it by introducing a third optional value?: unknown parameter to the callback AND consider which drivers already have it in their watch event (I guess currently only web-based drivers)

Closing PR but feel free to open a new with above proposal.

@pi0 pi0 closed this May 1, 2024
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.

2 participants