MCPcopy Create free account
hub / github.com/Automattic/mongoose / applyQueryMethods

Function applyQueryMethods

lib/model.js:5158–5162  ·  view source on GitHub ↗

* Register custom query methods for this model * * @param {Model} model * @param {Schema} schema * @api private

(model, methods)

Source from the content-addressed store, hash-verified

5156 */
5157
5158function applyQueryMethods(model, methods) {
5159 for (const i in methods) {
5160 model.Query.prototype[i] = methods[i];
5161 }
5162}
5163
5164/**
5165 * Subclass this model with `conn`, `schema`, and `collection` settings.

Callers 1

model.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected