passioninfinite / mongoosejs-soft-delete Goto Github PK
View Code? Open in Web Editor NEWSoft Delete plugin for mongoose.
License: MIT License
Soft Delete plugin for mongoose.
License: MIT License
Is your feature request related to a problem? Please describe.
Your plugin it's awesome. I think the only is missing is to track the user with deletedBy
Describe the solution you'd like
Have a deletedBy property and set value on delete.
The findByIdDeleted
method isn't working as described in the docs.
In the docs it says that findByIdDeleted
takes a callback that returns a document
Sample.findByIdDeleted(sampleId, function(err, doc) {
//doc.deletedAt will be current timestamp
//doc.deleted will be true
})
But instead findByIdDeleted
isn't doing anything with the callback.
const result = UserModel.findByIdDeleted('60b6dbd320329b2952db39e8', function (err, doc) {
console.log(err || doc); // code never gets here
});
result //> returns a query
Also the function returns a model.Query
, not a mongoose document:
model.Query {
_collection:NodeCollection {collection: NativeCollection, collectionName: 'users'}
_conditions:{_id: '60b6dbd320329b2952db39e8', deleted: true}
_distinct:undefined
_executionCount:0
_fields:undefined
...
}
Is your feature request related to a problem? Please describe.
We can improve the readme reading by adding js format
Describe the solution you'd like
Add js tag after triple back quotes
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently don't work on count
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Need work on count method
When I try to use the plugin with mongoose paginate, I canβt found any record π
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.