New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db.destroy doesn't work on memdown created with {db: require('memdown')} #3144
Comments
Just confirming... it is possible that the bug is aplicable to any PouchDB instance using a custom {db: require('...') } options, which are not used on the 'new' pouchdb instance created when destroy is called ? |
right it's if you pass it in as an option |
@calvinmetcalf I'have another bug, when using this commit. Maybe u can fix it faster than i can, and kill 2 birds from a single shot :-) This simply code fails on Node, when using db: { require('sqldown') } var PouchDB = require('pouchdb');
var pouch = new PouchDB('test.db', {
db: require('sqldown')
});
pouch.put({
_id: '_design/test',
views: {
test: {
map: function(doc) {
return doc;
}.toString()
}
}
}).then(function() {
pouch.destroy()
.then(function() {
console.log('ok ');
})
.catch(function(err) {
console.log('error ', err);
});
}); I'get the error: error { [Error: EBUSY, unlink 'C:\Git\project\test.db']
errno: 10,
code: 'EBUSY',
path: 'C:\\Git\\project\\test.db' } Maybe the destroy code for other adapters are missing some "close all files" before actually destroying? |
um I think that is an error in sqldown |
No description provided.
The text was updated successfully, but these errors were encountered: