Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Automattic/mongoose
/ functions
Functions
1,512 in github.com/Automattic/mongoose
⨍
Functions
1,512
◇
Types & classes
795
↓ 1 callers
Function
apply
(method, schema)
lib/helpers/model/applyMethods.js:17
↓ 1 callers
Function
applyChangeTracking
(doc, fullPath, skipParentChangeTracking)
lib/helpers/document/applyDefaults.js:191
↓ 1 callers
Method
applyDefaults
(obj: AnyObject)
types/models.d.ts:267
↓ 1 callers
Function
applyExclusiveProjection
(doc, projection, hasIncludedChildren, projectionLimb, prefix)
lib/helpers/projection/applyProjection.js:34
↓ 1 callers
Function
applyGetters
* Applies virtuals properties to `json`. * * @param {Document} self * @param {object} json * @return {object} `json` * @api private
lib/document.js:4539
↓ 1 callers
Function
applyInclusiveProjection
(doc, projection, hasIncludedChildren, projectionLimb, prefix)
lib/helpers/projection/applyProjection.js:59
↓ 1 callers
Function
applyQueryMethods
* Register custom query methods for this model * * @param {Model} model * @param {Schema} schema * @api private
lib/model.js:5235
↓ 1 callers
Function
applyQueue
(doc)
lib/document.js:4087
↓ 1 callers
Function
applySchemaTypeTransforms
* Applies schema type transforms to `json`. * * @param {Document} self * @param {object} json * @return {object} `json` * @api private
lib/document.js:4633
↓ 1 callers
Function
applyTimestamps
* Apply a given schema's timestamps to the given POJO * * @param {Schema} schema * @param {object} obj * @param {object} [options] * @param {bool
lib/helpers/document/applyTimestamps.js:19
↓ 1 callers
Method
applyTimestamps
* Apply this model's timestamps to a given POJO, including subdocument timestamps
types/models.d.ts:276
↓ 1 callers
Function
applyTimestampsToDoc
* Apply timestamps to a given document. Does not apply timestamps to subdocuments: use `applyTimestampsToChildren` instead * * @param {Schema} schem
lib/helpers/document/applyTimestamps.js:64
↓ 1 callers
Function
applyTimestampsToDocumentArray
(arr, schematype, now)
lib/helpers/update/applyTimestampsToChildren.js:82
↓ 1 callers
Function
applyTimestampsToSingleNested
(subdoc, schematype, now)
lib/helpers/update/applyTimestampsToChildren.js:108
↓ 1 callers
Function
applyTimestampsToUpdateKey
(schema, key, update, now)
lib/helpers/update/applyTimestampsToChildren.js:127
↓ 1 callers
Function
applyVirtuals
(self, json, options, toObjectOptions)
lib/document.js:4450
↓ 1 callers
Function
applyVirtuals
* Apply a given schema's virtuals to a given POJO * * @param {Schema} schema * @param {object} obj * @param {string[]} [virtuals] optional whiteli
lib/helpers/document/applyVirtuals.js:17
↓ 1 callers
Method
applyVirtuals
(obj: AnyObject, virtalsToApply?: string[])
types/models.d.ts:271
↓ 1 callers
Function
applyVirtualsToChildren
* Apply virtuals to any subdocuments * * @param {Schema} schema subdocument schema * @param {object} res subdocument * @param {string[]} [virtuals
lib/helpers/document/applyVirtuals.js:49
↓ 1 callers
Function
assertDocumentStructure
(payment)
test/model.updateOne.test.js:3493
↓ 1 callers
Function
assertErrorProperties
(user)
test/model.test.js:8703
↓ 1 callers
Function
assertInvalidateError
test/document.validate.test.js:1671
↓ 1 callers
Function
assertValidationError
test/document.validate.test.js:120
↓ 1 callers
Function
assignRawDocsToIdStructure
* Assign `vals` returned by mongo query to the `rawIds` * structure returned from utils.getVals() honoring * query sort order if specified by user.
lib/helpers/populate/assignRawDocsToIdStructure.js:34
↓ 1 callers
Method
assimilateError
* MongooseServerSelectionError constructor * * @api private
lib/error/serverSelection.js:32
↓ 1 callers
Function
asyncQueue
()
lib/helpers/cursor/eachAsync.js:192
↓ 1 callers
Function
autoEncryptionOptions
()
test/encryption/encryption.test.js:48
↓ 1 callers
Function
autoTypedModelConnection
()
test/types/connection.test.ts:86
↓ 1 callers
Function
binaryToString
* Convert binary to a uuid string * @param {Buffer|Binary|string} uuidBin The value to process * @returns {string} The completed uuid-string * @api
lib/schema/uuid.js:21
↓ 1 callers
Function
buildMarkdown
* Build the Markdown source for a parsed API page. * @param {DocsObj} data The parsed API page data * @returns {String}
docs/source/api.js:280
↓ 1 callers
Function
buildNestedPath
* `schemaMap`s are JSON schemas, which use the following structure to represent objects: * { field: { bsonType: 'object', properties: { ... } }
lib/schema.js:1042
↓ 1 callers
Function
buildPreSavePromise
(document, options)
lib/model.js:3733
↓ 1 callers
Method
byName
(this: ProjectModelQuery, name: string)
test/types/queryhelpers.test.ts:13
↓ 1 callers
Function
calledWithString
()
test/model.middleware.preposttypes.test.js:153
↓ 1 callers
Function
canMerge
* Determine if we can merge the given value as a query filter. Override for mquery.canMerge() to allow null
lib/query.js:5889
↓ 1 callers
Method
cast
(val: unknown)
test/types/schema.create.test.ts:382
↓ 1 callers
Method
cast
(val: unknown)
test/types/schema.test.ts:383
↓ 1 callers
Method
cast
(val)
test/docs/schematypes.test.js:40
↓ 1 callers
Function
castArithmetic
(val)
lib/helpers/query/cast$expr.js:191
↓ 1 callers
Function
castComparison
(val, schema, strictQuery)
lib/helpers/query/cast$expr.js:216
↓ 1 callers
Function
castIn
(val, schema, strictQuery)
lib/helpers/query/cast$expr.js:162
↓ 1 callers
Function
castNumberOperator
(val)
lib/helpers/query/cast$expr.js:150
↓ 1 callers
Function
castPipelineOperator
(op, val)
lib/helpers/query/castUpdate.js:177
↓ 1 callers
Function
castUpdateVal
* Casts `val` according to `schema` and atomic `op`. * * @param {SchemaType} schema * @param {object} val * @param {string} op the atomic operator
lib/helpers/query/castUpdate.js:586
↓ 1 callers
Function
checkCalls
()
test/model.middleware.preposttypes.test.js:150
↓ 1 callers
Function
checkDiscriminatorModelsFindDocumentsOfItsType
(fields)
test/model.discriminator.querying.test.js:264
↓ 1 callers
Function
checkDiscriminatorModelsFindOneDocumentOfItsType
(fields)
test/model.discriminator.querying.test.js:485
↓ 1 callers
Function
checkDivergentArray
* Determine if array was populated with some form of filter and is now * being updated in a manner which could overwrite data unintentionally. * *
lib/document.js:5470
↓ 1 callers
Function
checkFolder
(folder)
test/types/check-types-filename.js:6
↓ 1 callers
Function
checkHydratesCorrectModels
(fields)
test/model.discriminator.querying.test.js:155
↓ 1 callers
Function
checkRequireFilter
(filter, options)
lib/query.js:200
↓ 1 callers
Function
cleanParent
(doc, path, seen = new Set())
lib/helpers/document/cleanModifiedSubpaths.js:35
↓ 1 callers
Method
clientEncryption
* If auto encryption is enabled, returns a ClientEncryption instance that is configured with the same settings that * Mongoose's underlying Mongo
types/models.d.ts:1765
↓ 1 callers
Function
cloneAndTestDeepEquals
()
test/schematype.test.js:119
↓ 1 callers
Function
cloneArray
(arr, options)
lib/helpers/clone.js:199
↓ 1 callers
Function
cloneObject
(obj, options, isArrayChild)
lib/helpers/clone.js:160
↓ 1 callers
Function
clonePopulate
(pop)
lib/helpers/query/cloneMongooseOptions.js:29
↓ 1 callers
Function
cloneRegExp
(regexp)
lib/helpers/clone.js:255
↓ 1 callers
Function
close
()
test/connection.test.js:678
↓ 1 callers
Function
closeMenu
()
docs/js/mobile-navbar-toggle.js:14
↓ 1 callers
Function
collectIndexes
(schema, prefix, baseSchema)
lib/helpers/schema/getIndexes.js:23
↓ 1 callers
Function
compileParent
()
test/index.test.js:529
↓ 1 callers
Function
compileRoot
()
test/index.test.js:528
↓ 1 callers
Function
completeOne
* hydrates a document * * @param {Model} model * @param {Document} doc * @param {object} res 3rd parameter to callback * @param {object} fields
lib/query.js:3377
↓ 1 callers
Function
convertNewToReturnDocument
* Support the `new` option as an alternative to `returnOriginal` for backwards * compat. * @api private
lib/query.js:3992
↓ 1 callers
Function
convertTypesToString
(types, typesDescription)
docs/source/api.js:217
↓ 1 callers
Function
copyAllRequiredFiles
Copy all static files when versionedDeploy is used
scripts/website.js:667
↓ 1 callers
Function
copyVendorFiles
()
scripts/website.js:661
↓ 1 callers
Function
create
()
lib/model.js:1769
↓ 1 callers
Function
createCustomSchema
()
test/document.test.js:14569
↓ 1 callers
Function
createDocs
benchmarks/insertManySimple.js:29
↓ 1 callers
Function
createDollarPathTestContext
()
test/model.updateOne.test.js:3928
↓ 1 callers
Function
createFetch
()
lib/helpers/cursor/eachAsync.js:75
↓ 1 callers
Function
createImmutableSetter
(path, immutable)
lib/helpers/schematype/handleImmutable.js:21
↓ 1 callers
Function
createLogicalQueryOperatorHandler
(op)
lib/schema/array.js:657
↓ 1 callers
Function
createMethodsContext
({ supportsMiddlewareOption = false } = {})
test/model.skip.middleware.test.js:1111
↓ 1 callers
Function
createMod
(mod)
test/helpers/populate.splitPopulateQuery.test.js:18
↓ 1 callers
Function
createModel
()
test/model.discriminator.test.js:2593
↓ 1 callers
Function
createPopulateReadContext
()
test/query.test.js:4836
↓ 1 callers
Function
createSchema
(path, subSchema)
test/document.test.js:13590
↓ 1 callers
Method
createSearchIndex
* Create an [Atlas search index](https://www.mongodb.com/docs/atlas/atlas-search/create-index/). * This function only works when connected to Mon
types/models.d.ts:348
↓ 1 callers
Function
createSlug
(value)
scripts/website.js:728
↓ 1 callers
Function
createSomeModelAndDoSomething
()
test/types/lean.test.ts:348
↓ 1 callers
Function
createStaticsContext
({ supportsMiddlewareOption = false } = {})
test/model.skip.middleware.test.js:1003
↓ 1 callers
Function
createTestContext
()
test/model.findOneAndUpdate.test.js:2475
↓ 1 callers
Function
createTestContext
()
test/model.hydrate.test.js:496
↓ 1 callers
Function
createTestContext
({ timestamps = true } = {})
test/model.updateOne.test.js:3132
↓ 1 callers
Function
createTestContext
({ versionKey, defaults, validation, optimisticConcurrency } = {})
test/model.test.js:3169
↓ 1 callers
Function
createTestContext
()
test/document.validate.test.js:1863
↓ 1 callers
Function
createTestContext
({ employeeNameMinLength, employeeName = 'john' } = {})
test/types.map.test.js:1981
↓ 1 callers
Function
createTestContext
()
test/types.documentarray.test.js:1041
↓ 1 callers
Function
createTestContext
({ refPath } = {})
test/document.test.js:2976
↓ 1 callers
Function
createTestContext
* Unified test context factory that creates a schema with all hooks registered. * Tests can check counters for any hook type without needing separa
test/model.skip.middleware.test.js:1135
↓ 1 callers
Function
createTestContext
()
test/versioning.test.js:722
↓ 1 callers
Function
createTestContext
(options)
test/model.middleware.test.js:691
↓ 1 callers
Function
createTestContext
(options)
test/model.insertMany.test.js:946
↓ 1 callers
Function
createTestContext
()
test/model.populate.test.js:12524
↓ 1 callers
Function
createWithAggregateErrors
()
test/types/create.test.ts:133
↓ 1 callers
Function
decideModelByObject
* gets discriminator model if discriminator key is present in object * @api private
lib/helpers/model/castBulkWrite.js:324
↓ 1 callers
Function
decrypt
(doc, path)
test/document.test.js:9644
← previous
next →
301–400 of 1,512, ranked by callers