thenativeweb / node-eventstore

EventStore Implementation in node.js
http://eventstore.js.org/
MIT License
538 stars 117 forks source link

Flag for dropping existing data when initializing? #155

Closed gingobaum closed 5 years ago

gingobaum commented 5 years ago

Is it possible (or are there any chances) to provide a flag that signals eventstore to drop all existing data and/or databases, so we can start from zero?

For example in sequelize there is a flag called force, that creates that behavior.

I think, it would be great for development and testing purposes.

nanov commented 5 years ago

I believe es.store.clear(cb) is what you are looking for.

gingobaum commented 5 years ago

Yes, looks like it. Maybe it should be mentioned in the documentation?

And how about a options flag for the user's convenience?

nanov commented 5 years ago

I truly don't see any point in such options flag.

However, as long as it is falsy by default i also have noting against it, PRs are welcome.