incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flinn Mueller <theflinns...@gmail.com>
Subject Re: ruby client
Date Wed, 31 Dec 2008 19:18:12 GMT
did you look at datamapper?  I'm somewhat interested in datamapper but  
I'm leery of being tied to a sql orm.


On Dec 31, 2008, at 12:51 PM, Paul Gross wrote:

>
>> qq, your choice of couch ruby client (and why)?
>
> I use CouchRest (http://github.com/jchris/couchrest/tree/master) and  
> have been very happy with it.  It has both a low-level API:
>
>   response = @db.save({:key => 'value', 'another key' => 'another  
> value'})
>        doc = @db.get(response['id'])
>
> and an ActiveRecord like model class:
>
>   class Course < CouchRest::Model
>      key_accessor :title
>      cast :questions, :as => ['Question']
>      cast :professor, :as => 'Person'
>      view_by :title
>      view_by :dept, :ducktype => true
>   end
>
> Paul Gross
> http://www.pgrs.net
>


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