incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: Unique human readable ID
Date Thu, 30 Jul 2009 07:52:29 GMT
On Wed, Jul 29, 2009 at 01:33:50PM +1000, Nicholas Orr wrote:
> I get the whole point of letting couchdb generate id's.
> At the same time I need a way to create a human
> memorable/readable/communicative id:
>  - ID: 45060, 45061, 45062, etc
> That is a whole lot simpler to relay over a phone call compared to:
> - 1d98d82f5b6a628527344ba991cb7e2f

#3. You could do what Git does: let people give the first few characters of
the ID, which is normally unique, and ask for more if needed.

  N = 6
  while (there are 2 or more docs in the DB with this N char prefix)
    N += 2;
  display first N characters of ID followed by ".."


Mime
View raw message