incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominic Tarr <dominic.t...@gmail.com>
Subject Re: unique constraint in couchdb
Date Fri, 28 Oct 2011 04:28:33 GMT
so, a user may have a multiple timestamps, but they must all be unique?

what do the timestamps represent? is there some other feature that could be
in the key?

or, could you use a update handler and put all timestamps per user in the
same document?

On Mon, Oct 24, 2011 at 7:48 AM, Michael Zedeler <michael@zedeler.dk> wrote:

> On 2011-10-20 15:19, Alexander Uvarov wrote:
>
>> is there something on the roadmap for couchdb that would solve our unique
>>> key problem?
>>>
>> There is no uniqueness in CouchDB and I think will never be.
>>
>> PS: I think that will be cool to have a feature to declare such
>> constraints. And mark documents (if constraint void) just like them
>> marked when conflict occurs (doc._conflict). Something like
>> doc._constraints["unique_**timestamp"]. Then it will be possible to
>> create a view and retrieve a list of documents with constraints
>> violation.
>>
> But isn't this possible to do just by writing a view with a suitable reduce
> function?
>
> --
> Michael Zedeler
> 70 25 19 99 | LinkedIn <http://dk.linkedin.com/in/**mzedeler<http://dk.linkedin.com/in/mzedeler>>
> | Twitter <http://twitter.com/#%21/**mzedeler<http://twitter.com/#%21/mzedeler>>
> | Github <https://github.com/mzedeler>
>

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