#13 new
Seth Ladd

Let Users Provide a UuidFactory

Reported by Seth Ladd | October 23rd, 2008 @ 05:02 PM


Another option is to let a user pass in a UuidFactory, responsible for generating and caching UUIDs. This way, if your server doesn't support /_uuids (as is the case with 0.8.1) or you want to provide your own algorithm, it's a simple interface to implement.

Would expect you could do something like:

CouchDb.uuid_factory = MyOwnUuidFactory.new

and the default implementation is the existing CouchDbUuidFactory.

It nicely centralizes the UUID generation and makes it pluggable.

Thanks, Seth

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

"CouchDB, close to the metal." <a href="http://github.com/jchris/couchrest/tree/master">CouchRest</a> is a RESTful layer for accessing CouchDB, based off CouchDB's included Javascript reference client. CouchRest also includes helpers for running large queries etc. There is also a base class for ActiveRecord / Datamapper style ORM, called CouchRest::Model.

People watching this ticket