UNPKG

ottoman

Version:
19 lines (18 loc) 919 B
import { ModelMetadata } from '../model/interfaces/model-metadata.interface'; import { ManyQueryResponse, StatusExecution } from './types'; import { ModelTypes } from '../model/model.types'; import { MutationFunctionOptions } from '../utils/cast-strategy'; /** * Async Function: Update all of the documents that match conditions from the collection. * Allows use of filters and options. * * @param documents List of documents to update * @param doc Fields to update. * * @return (ManyQueryResponse)[(/classes/queryresponse.html)] */ export declare const updateMany: (metadata: ModelMetadata) => (documents: ModelTypes[], doc: Partial<ModelTypes>, options: MutationFunctionOptions) => Promise<ManyQueryResponse>; /** * @ignore */ export declare const updateCallback: (document: ModelTypes, metadata: ModelMetadata, extra: Record<string, unknown>, options: MutationFunctionOptions) => Promise<StatusExecution>;