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

Collection-level validator functions #418

Closed
sanderpick opened this issue Aug 12, 2020 · 1 comment · Fixed by #416
Closed

Collection-level validator functions #418

sanderpick opened this issue Aug 12, 2020 · 1 comment · Fixed by #416
Assignees
Milestone

Comments

@sanderpick
Copy link
Member

sanderpick commented Aug 12, 2020

I've already been POC-ing this idea, but creating an issue now for tracking. Essentially, allow the user to write a function that validates a update event.

@sanderpick
Copy link
Member Author

sanderpick commented Aug 18, 2020

The full DB access story is a bit unwieldy... so, breaking it down here:

Collection writes

  • NewCollection: Touches thread via CreateThread (Net.ValidateWrite)
  • DeleteCollection: Touches thread via DeleteThread (Hub context + Net.ValidateWrite)
  • UpdateCollection: Does not touch thread, but will when collection info is persisted to thread records (Hub context + Net.ValidateWrite)

Collection reads

  • GetCollection: Does not and won't ever touch thread (Hub context + Net.ValidateRead)
  • ListCollections: Does not and won't ever touch thread (Hub context + Net.ValidateRead)

Data reads

  • Find: Does not and won't ever touch thread (ReadFilter + Net.ValidateRead)
  • FindByID: Does not and won't ever touch thread (ReadFilter + Net.ValidateRead)
  • Has: Does not and won't ever touch thread (ReadFilter + Net.ValidateRead)
  • Listen: Does not and won't ever touch thread (ReadFilter + Net.ValidateRead)

Data writes

  • Create: Touches thread via CreateRecord (WriteValidator + Net.ValidateWrite)
  • Save: Touches thread via CreateRecord (WriteValidator + Net.ValidateWrite)
  • Delete: Touches thread via CreateRecord (WriteValidator + Net.ValidateWrite)

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 a pull request may close this issue.

1 participant