Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Automattic/mongoose
/ functions
Functions
1,456 in github.com/Automattic/mongoose
⨍
Functions
1,456
◇
Types & classes
788
↓ 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:4369
↓ 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:265
↓ 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:3291
↓ 1 callers
Function
assertErrorProperties
(user)
test/model.test.js:8511
↓ 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:1027
↓ 1 callers
Function
buildPreSavePromise
(document, options)
lib/model.js:3678
↓ 1 callers
Function
buildProps
(prefix)
benchmarks/findOneAndUpdateSimple.js:100
↓ 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:5858
↓ 1 callers
Method
cast
(val: unknown)
test/types/schema.create.test.ts:382
↓ 1 callers
Method
cast
(val: unknown)
test/types/schema.test.ts:385
↓ 1 callers
Method
cast
(val)
test/docs/schematypes.test.js:40
↓ 1 callers
Function
castArithmetic
(val)
lib/helpers/query/cast$expr.js:183
↓ 1 callers
Function
castComparison
(val, schema, strictQuery)
lib/helpers/query/cast$expr.js:208
↓ 1 callers
Function
castIn
(val, schema, strictQuery)
lib/helpers/query/cast$expr.js:154
↓ 1 callers
Function
castNumberOperator
(val)
lib/helpers/query/cast$expr.js:142
↓ 1 callers
Function
castPipelineOperator
(op, val)
lib/helpers/query/castUpdate.js:176
↓ 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:564
↓ 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:5389
↓ 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:191
↓ 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:1418
↓ 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
cloneRegExp
(regexp)
lib/helpers/clone.js:246
↓ 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
completeOne
* hydrates a document * * @param {Model} model * @param {Document} doc * @param {object} res 3rd parameter to callback * @param {object} fields
lib/query.js:3361
↓ 1 callers
Function
convertNewToReturnDocument
* Support the `new` option as an alternative to `returnOriginal` for backwards * compat. * @api private
lib/query.js:3984
↓ 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:666
↓ 1 callers
Function
copyVendorFiles
()
scripts/website.js:660
↓ 1 callers
Function
create
()
lib/model.js:1766
↓ 1 callers
Function
createCustomSchema
()
test/document.test.js:14958
↓ 1 callers
Function
createDocs
benchmarks/insertManySimple.js:29
↓ 1 callers
Function
createDollarPathTestContext
()
test/model.updateOne.test.js:3625
↓ 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:634
↓ 1 callers
Function
createMod
(mod)
test/helpers/populate.splitPopulateQuery.test.js:18
↓ 1 callers
Function
createSchema
(path, subSchema)
test/document.test.js:13861
↓ 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:342
↓ 1 callers
Function
createSlug
(value)
scripts/website.js:727
↓ 1 callers
Function
createSomeModelAndDoSomething
()
test/types/lean.test.ts:348
↓ 1 callers
Function
createTestContext
()
test/model.findOneAndUpdate.test.js:2428
↓ 1 callers
Function
createTestContext
()
test/model.hydrate.test.js:450
↓ 1 callers
Function
createTestContext
()
test/model.updateOne.test.js:2952
↓ 1 callers
Function
createTestContext
({ versionKey, defaults, validation, optimisticConcurrency } = {})
test/model.test.js:3169
↓ 1 callers
Function
createTestContext
({ employeeNameMinLength, employeeName = 'john' } = {})
test/types.map.test.js:1888
↓ 1 callers
Function
createTestContext
()
test/types.documentarray.test.js:951
↓ 1 callers
Function
createTestContext
({ refPath } = {})
test/document.test.js:3276
↓ 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:655
↓ 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:921
↓ 1 callers
Function
createTestContext
()
test/model.populate.test.js:12332
↓ 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:300
↓ 1 callers
Function
decrypt
(doc, path)
test/document.test.js:9927
↓ 1 callers
Function
defaultIndexOptsToFalse
(opts)
lib/helpers/processConnectionOptions.js:49
↓ 1 callers
Function
delay
(ms)
test/model.updateOne.test.js:3637
↓ 1 callers
Function
delay
(ms)
test/timestamps.test.js:1046
↓ 1 callers
Function
delay
(ms)
test/model.test.js:10087
↓ 1 callers
Function
delay
(ms)
test/query.cursor.test.js:991
↓ 1 callers
Function
deleteAllHtmlFiles
()
scripts/website.js:122
↓ 1 callers
Function
doExit
(code)
test/deno.mjs:34
↓ 1 callers
Function
docs
(arr)
test/types.array.test.js:1753
↓ 1 callers
Function
downloadCryptShared
()
scripts/setup-encryption-tests.js:16
↓ 1 callers
Function
encrypt
(doc, path, value)
test/document.test.js:9922
↓ 1 callers
Function
exists
* @param {string} path * * @returns {boolean}
test/encryption/encryption.test.js:23
↓ 1 callers
Function
extractTextUrlFromTag
* Extract the Text and Url from a description if any * @param {Tag} tag The tag to process the resulting object from * @param {PropContext} ctx The
docs/source/api.js:591
↓ 1 callers
Function
filter
()
test/query.test.js:655
↓ 1 callers
Method
findByFullName
(name)
test/docs/schemas.test.js:53
↓ 1 callers
Function
findChildModel
* Check if there is an embedded schematype in the given schematype. Handles drilling down into primitive * arrays and maps in case of array of array
lib/helpers/model/applyHooks.js:134
↓ 1 callers
Method
findOne
( filter: QueryFilter<mongoose.WithLevel1NestedPaths<Blog>>, projection: Projection, options
test/types/queries.test.ts:531
↓ 1 callers
Method
findSomething
(this: TestModel)
test/types/plugin.test.ts:49
↓ 1 callers
Function
fixNoAsyncFn
()
docs/js/convert-old-anchorid.js:73
↓ 1 callers
Function
fixSubIndexPaths
* Checks for indexes added to subdocs using Schema.index(). * These indexes need their paths prefixed properly. * * schema._indexes = [ [inde
lib/helpers/schema/getIndexes.js:142
↓ 1 callers
Function
flatten
(update, path, options, schema)
lib/helpers/common.js:20
↓ 1 callers
Function
foo
(model: Model<User, {}, {}, {}>)
test/types/models.test.ts:240
↓ 1 callers
Method
foo
()
test/model.test.js:9034
← previous
next →
301–400 of 1,456, ranked by callers