How does Couchdb calculates the document revision number?
2
votes
2
answers
1246
views
Whats the exact algorithm to calculate the CouchDB revision number.
CouchDB uses a deterministic algorithm to calculate the document revision number.
Here is one relevant doc I found:
https://stackoverflow.com/questions/5954864/how-does-couchdb-calculate-the-revision-number
Buts its all in elrang, I am trying to implement it in dart.
I use sample document :
{"_id":"123-this-is-an-id","hello":"world","testing":123}
for testing.
When I do the MD5 hash of it , its gives me : f0853833850bce08dce0896e010a375e, where as the couchdb revision number is :
"_rev": "1-43dce8fe7e9a26b49390e3727a015cc0"
I google it everywhere, but if I can find the algorithm some where in text , UI can convert it into dart.
Asked by user3769778
(121 rep)
Oct 26, 2019, 03:09 PM
Last activity: Oct 5, 2021, 11:04 AM
Last activity: Oct 5, 2021, 11:04 AM