@ghostjs/mongoose-explain
v1.0.6
Published
A mongoose plugin for logging .explain() output of queries
Downloads
10
Maintainers
Readme
mongoose-explain
A mongoose plugin for logging .explain()
output of queries
Installation
npm install --save @ghostjs/mongoose-explain
# OR
yarn add @ghostjs/mongoose-explain
Usage
import mongoose from 'mongoose';
import { explain } from '@ghostjs/mongoose-explain';
interface Data {
someProp: string;
}
const schema = new mongoose.Schema<Data>({
someProp: String,
});
schema.plugin(
explain({
// optional options...
}),
);
Building
Run nx build mongoose-explain
to build the library.
Running unit tests
Run nx test mongoose-explain
to execute the unit tests via Jest.
License
This project is licensed under the MIT license, a copy of which can be found at LICENSE.