R
R
RedDokC22017-06-02 18:08:48
JavaScript
RedDokC2, 2017-06-02 18:08:48

NeDB data update and download, will it fail?

When updating data, NeDB does not overwrite the data, but creates a new row.
Won't it happen that NeDB selects a row with stale data when it reads it? It looks like this.

{"log":"red","pass":"fff","unitg":{"id":null,"x":5,"y":5},"_id":"vTujNu7XuacFl35N"}
{"log":"red","pass":"fff","unitg":{"id":null,"x":10,"y":5},"_id":"vTujNu7XuacFl35N"}
{"log":"red","pass":"fff","unitg":{"id":null,"x":11,"y":5},"_id":"vTujNu7XuacFl35N"}

So far everything is fine, but I want to know for the future that this will not happen.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question