googleapis / googleapis/google-cloud-node

FR: recursive delete should have a callback with document data

Open
#7,481 2 comments 0 reactions 0 assignees View on GitHub
api: firestore library: nodejs-firestore priority: p3 type: feature request
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

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

Yes, I want to perform a recursive delete and need the data of the deleted documents to perform subsequent operations to clean up my database.

**Describe the solution you'd like**

RecursiveDelete creates a stream reading all documents that are being deleted => so if we are reading the data anyway why not pass them to a callback function?

**Describe alternatives you've considered**

Add an onDeleteDocument listener to every document. I am not a fan of this approach because I prefer to keep data logic in a single function. It is also not a clean approach because it leads to cases where onDelete is triggered unnecessarily.

**Additional context**
I could create a pull request if you want

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.