MCPcopy
hub / github.com/Automattic/mongoose / create

Method create

types/models.d.ts:316–316  ·  view source on GitHub ↗

Creates a new document or documents

()

Source from the content-addressed store, hash-verified

314
315 /** Creates a new document or documents */
316 create(): Promise<null>;
317 create(doc: Partial<TRawDocType>): Promise<THydratedDocumentType>;
318 create(docs: Array<Partial<TRawDocType>>): Promise<THydratedDocumentType[]>;
319 create(docs: Array<DeepPartial<ApplyBasicCreateCasting<Require_id<TRawDocType>>>>, options: CreateOptions & { aggregateErrors: true }): Promise<(THydratedDocumentType | Error)[]>;

Callers 15

schema.jsFile · 0.80
MongooseFunction · 0.80
connectionState.jsFile · 0.80
subdocument.jsFile · 0.80
defineKeyFunction · 0.80
documentArray.jsFile · 0.80
_createConstructorFunction · 0.80
subdocument.jsFile · 0.80
_createConstructorFunction · 0.80
bigint.jsFile · 0.80

Calls

no outgoing calls

Tested by 15

setupDataFunction · 0.64
initializeDataFunction · 0.64
createTestContextFunction · 0.64
createTestContextFunction · 0.64
gh13772WithSchemaCreateFunction · 0.64
createWithSubdocFunction · 0.64
createWithDocArrayFunction · 0.64
createWithMapOfSubdocsFunction · 0.64
createWithSubdocsFunction · 0.64