Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 343 Bytes

for-each-document.md

File metadata and controls

13 lines (11 loc) · 343 Bytes

forEachDocument

This method iterates over the documents in a database, calling a callback for each one. It accepts an optional Mango selector.

declare async function forEachDocument(
  db: DocumentScope<any>,
  callback: (document: unknown) => void | Promise<void>,
  opts?: {
    selector?: MangoSelector
  }
): Promise<void>