#[on_delete_many_docs]
Expand description

The on_delete_many_docs function is a procedural macro attribute for hooking into the OnDeleteManyDocs event. It allows you to define custom logic to be executed when multiple documents are deleted.

Example:

#[on_delete_many_docs]
async fn on_delete_many_docs(context: OnDeleteManyDocsContext) -> Result<(), String> {
    // Your hook logic here
}

When no attributes are provided, the hook is triggered for any document set within any collection. You can scope the events to a particular list of collections.

Example:

#[on_delete_many_docs(collections = ["demo"])]
async fn on_delete_many_docs(context: OnDeleteManyDocsContext) -> Result<(), String> {
    // Your hook logic here
}

The attributes accept a list of comma-separated collections. If the attribute array is left empty, the hook will never be called.