A mongoose plugin for logging .explain() output of queries
npm install @ghostjs/mongoose-explainA mongoose plugin for logging .explain() output of queries
``sh
npm install --save @ghostjs/mongoose-explain
yarn add @ghostjs/mongoose-explain
`
`typescript
import mongoose from 'mongoose';
import { explain } from '@ghostjs/mongoose-explain';
interface Data {
someProp: string;
}
const schema = new mongoose.Schema({
someProp: String,
});
schema.plugin(
explain({
// optional options...
}),
);
`
Run nx build mongoose-explain to build the library.
Run nx test mongoose-explain` to execute the unit tests via Jest.
This project is licensed under the MIT license, a copy of which can be found at LICENSE.