revision format

9 views
Skip to first unread message

Brett Harrison

unread,
Jan 27, 2015, 4:58:17 PM1/27/15
to mobile-c...@googlegroups.com
In the sync gateway data feed, when the first number of the revision (ex. 1-1dec8991883482368060e6bf2f21a783) is 1 does that mean that this is the first version?  So if I would like to trigger a process only when the first version is created I can look for the 1?

Jens Alfke

unread,
Jan 27, 2015, 11:01:03 PM1/27/15
to mobile-c...@googlegroups.com

On Jan 27, 2015, at 1:58 PM, Brett Harrison <brett.h...@musicmastermind.com> wrote:

In the sync gateway data feed, when the first number of the revision (ex. 1-1dec8991883482368060e6bf2f21a783) is 1 does that mean that this is the first version?  So if I would like to trigger a process only when the first version is created I can look for the 1?

Yes, the number before the "-" is the generation count. 

It isn't exactly the first version … it's possible (but unlikely) to have a conflict where two clients create a new document (with different contents) and push it to the server. You'd then have two revisions starting with "1-". Basically they'd be contending to be the first revision, and someone would have to merge them.

—Jens

Reply all
Reply to author
Forward
0 new messages