Zvec Node.js API Reference
    Preparing search index...

    Interface ZVecDocIterator

    A synchronous, forward-only iterator over a collection snapshot.

    The iterator closes automatically when exhausted or when a for...of loop exits early. Call closeSync when abandoning an iterator that is consumed manually through next.

    Iteration order is unspecified. Once closed, all subsequent calls to next return an iterator result whose done property is true.

    interface ZVecDocIterator {
        next(): IteratorResult<ZVecDoc>;
        return(value?: unknown): IteratorResult<ZVecDoc>;
        closeSync(): void;
        "[iterator]"(): ZVecDocIterator;
    }

    Hierarchy

    • IterableIterator<ZVecDoc>
      • ZVecDocIterator
    Index

    Methods

    • Return the next document, or a completed iterator result at EOF.

      Returns IteratorResult<ZVecDoc>

    • Close the iterator after an early exit. Called automatically by for...of; an optional value is accepted for iterator-protocol compatibility and is ignored.

      Parameters

      • Optionalvalue: unknown

      Returns IteratorResult<ZVecDoc>

    • Explicitly close the iterator. This method is idempotent.

      Returns void