Skip to content
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

Doesn't include revisions after loaded?? #68

Open
Progklui opened this issue Oct 14, 2017 · 0 comments
Open

Doesn't include revisions after loaded?? #68

Progklui opened this issue Oct 14, 2017 · 0 comments

Comments

@Progklui
Copy link

Hi there,

I am experiencing a pretty strange issue. I am saving my pouchdb database with the following code:

location = locCurrent+'/currentDatabase.txt';

fs.existsSync(locCurrent) || fs.mkdirSync(locCurrent);

var wsCurrent = fs.createWriteStream(location);

pdb.dump(wsCurrent, {revs_: true}).then(function (res) {
  console.log(res);
});

I load the database with the following code:

var rs = fs.createReadStream(locationDatabase);

pdb.load(rs).then(function (res) {
  console.log(res);
  
  implementIndex(locationDatabase); 
  location.href = "index.html";
}).catch(function (err) {
  console.log(err);
});

Somehow I can't read the revisions which have been created in the database before the dump in the loaded database-they somehow get lost. Before loading the database all the content of it gets erased for info.

Could anyone please help me.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant