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

Function pluginQueryHelpers

test/types/plugin.test.ts:12–16  ·  view source on GitHub ↗
(schema: Schema<Test, any, any, TestQueryHelpers>)

Source from the content-addressed store, hash-verified

10}
11
12function pluginQueryHelpers(schema: Schema<Test, any, any, TestQueryHelpers>): void {
13 schema.query.whereSomething = function() {
14 return this.where({ name: 'something' });
15 };
16}
17
18function pluginMethods(schema: Schema<Test, any, TestInstanceMethods>): void {
19 schema.methods.doSomething = function() {

Callers

nothing calls this directly

Calls 1

whereMethod · 0.80

Tested by

no test coverage detected