incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erich oliphant <erich.oliph...@gmail.com>
Subject Re: getting all revisions from _changes
Date Sat, 17 Apr 2010 16:40:19 GMT
Thanks for the info.

Any 'patterns'/examples for doing the versioning programmatically ?  I have
a general idea based on you guys comments, but don't want to reinvent the
wheel ;)


On Sat, Apr 17, 2010 at 10:08 AM, Matt Goodall <matt.goodall@gmail.com>wrote:

> On 17 April 2010 14:42, erich oliphant <erich.oliphant@gmail.com> wrote:
> > Ok, so the 'versioning' in couch is really just for conflict resoultion,
> > etc?
>
> Correct.
>
> > Once a new _rev is successfully committed the previous goes away ?
>
> Sort of. CouchDB maintains revs of documents for two main reasons:
>
> * Replication. The revs history of a document is used to decide what
> needs replicating and if there's a conflict. These revs may disappear
> at any time, e.g. at compaction.
> * Conflicts. The revs of a document with a conflict are kept until the
> conflict has been explicitly resolved by the application or user.
>
> - Matt
>
> >
> > On Fri, Apr 16, 2010 at 7:29 AM, Matt Goodall <matt.goodall@gmail.com
> >wrote:
> >
> >> On 16 April 2010 11:53, Sebastian Cohnen <
> sebastiancohnen@googlemail.com>
> >> wrote:
> >> > see http://wiki.apache.org/couchdb/HTTP_database_API#Changes - I
> think
> >> you are looking for the since parameter
> >>
> >> The since parameter will not help, _changes only ever sends the last
> >> rev of a document.
> >>
> >> Erich, it sounds like you're trying to track multiple versions of a
> >> document. If that's correct then don't rely on revs. Multiple versions
> >> is something you need to handle yourself.
> >>
> >> - Matt
> >>
> >> >
> >> > On 16.04.2010, at 12:46, erich oliphant wrote:
> >> >
> >> >> Hi,
> >> >> I am using the _changes API and noticed that it only seems to keep
> track
> >> of
> >> >> the latest revisions of a document.  E.g. if I have change number 1,
> >> >> _id=1,_rev=1, then update document _id=1 to _rev=2, hitting the
> _changes
> >> URL
> >> >> only shows the _rev=2 and removes the first change id.  Is there a
> way
> >> to
> >> >> see *all* changes ?
> >> >>
> >> >> --
> >> >> Erich Oliphant
> >> >>
> >> >> "There are, in fact, two things, science and opinion, the former
> begets
> >> >> knowledge, the latter ignorance"
> >> >> -- Hippocrates of Cos
> >> >
> >> >
> >>
> >
> >
> >
> > --
> > Erich Oliphant
> >
> > "There are, in fact, two things, science and opinion, the former begets
> > knowledge, the latter ignorance"
> > -- Hippocrates of Cos
> >
>



-- 
Erich Oliphant

"There are, in fact, two things, science and opinion, the former begets
knowledge, the latter ignorance"
-- Hippocrates of Cos

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message