> On Jun 1, 2015, at 12:57 PM, Paul Harter <[email protected]> wrote: > > In the CouchDB docs it states that last_seq in the the return value of > _changes should be a number.
The docs are incorrect, then. In the REST API, sequences are arbitrary opaque JSON objects. This has been true since at least 2011. It happens that CouchDB uses integers (as does Couchbase Lite.) However, BigCouch and Cloudant both use strings. Couchbase Sync Gateway usually uses numbers but will use strings in some circumstances. Applications should treat sequence IDs as opaque. They’re not ordered, and you can’t even safely compare them for equality. The only use of a sequence ID is as a ‘cookie’ you get from the remote DB in order to pass back to it later, to continue the changes feed from where you left off. —Jens
