Skip to content

Add support for Create, Update and Delete multiple entries with hooks #61

Open
@dwill20

Description

Is your feature request related to a problem? Please describe.

  • Problem
    • Currently, hook is supported only for the following methods.
      • Create & CreateWithCtx
      • Update & UpdateWithCtx
      • Delete & DeleteWithCtx
    • This is inconvenient to create/update/delete multiple entries as the hook support does not exist. One must loop over the above methods to operate over multiple entries.
    • It's difficult to perform atomic operations and rollback (when dealing with multiple entries), if using just the above mentioned function, as one must define transaction and so on, creating verbose code.

Describe the solution you'd like

  • Add support for methods that allows creating/updating/deleting multiple entries, with support for hooks.

Describe alternatives you've considered

  • Currently the solution with the above mentioned methods include,
    • Looping over the methods to perform batch operations
    • Wrapping batch operation in transaction, so that rollback can be performed in case of failure
    • Using native methods (e.g. InsertMany, UpdateMany, DeleteMany). But, hook support does not exist.

Additional context

  • N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions