You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Paul Carey <pa...@gmail.com> on 2008/08/25 22:22:01 UTC
RelaxDB released
RelaxDB provides a(nother) Ruby interface to CouchDB. It takes its
inspiration from ActiveRecord and offers a simple idiom for specifying
object relationships. The underlying objects are persisted to CouchDB.
Combined with the schema free nature of CouchDB, RelaxDB's current
strength lies in quick prototyping of object models.
More details on github
http://github.com/paulcarey/relaxdb/wikis
A basic merb plugin, merb_relaxdb is also available on github.
Paul
====
class Post < RelaxDB::Document
property :created_at
property :contents
belongs_to :writer
has_many :ratings, :class => "Rating"
end
class Rating < RelaxDB::Document
property :thumbs_up, :validator => lambda { |tu| tu < 3 }
belongs_to :post
belongs_to :critic
end
post.ratings << Rating.new(:critic => gromit)
Rating.all.sorted_by(:thumbs_up) { |q| q.key(2).count(1) }
Re: RelaxDB released
Posted by Niket Patel <ne...@me.com>.
Thanks Paul,
Just looked at documentation not code. but,
Looks promising, specially uploading views using convention.
I will try to use this in current project.
On Aug 26, 2008, at 1:52 AM, Paul Carey wrote:
> RelaxDB provides a(nother) Ruby interface to CouchDB. It takes its
> inspiration from ActiveRecord and offers a simple idiom for specifying
> object relationships. The underlying objects are persisted to CouchDB.
> Combined with the schema free nature of CouchDB, RelaxDB's current
> strength lies in quick prototyping of object models.
>
> More details on github
> http://github.com/paulcarey/relaxdb/wikis
>
> A basic merb plugin, merb_relaxdb is also available on github.
>
> Paul
>
> ====
>
> class Post < RelaxDB::Document
> property :created_at
> property :contents
>
> belongs_to :writer
> has_many :ratings, :class => "Rating"
> end
>
> class Rating < RelaxDB::Document
> property :thumbs_up, :validator => lambda { |tu| tu < 3 }
>
> belongs_to :post
> belongs_to :critic
> end
>
> post.ratings << Rating.new(:critic => gromit)
> Rating.all.sorted_by(:thumbs_up) { |q| q.key(2).count(1) }
Re: RelaxDB released
Posted by Paul Carey <pa...@gmail.com>.
Niket, Sho: Thanks for the feedback
> Are you planning on supporting attachments?
Not in the short term, as it's not something I have an immediate need
for myself.
Paul
Re: RelaxDB released
Posted by Sho Fukamachi <sh...@gmail.com>.
Looks good. Great to have a nice lightweight persistable-object-
centric library like this. I especially like the auto-generated views
for "all".
Are you planning on supporting attachments?
thanks,
Sho
On 26/08/2008, at 6:22 AM, Paul Carey wrote:
> RelaxDB provides a(nother) Ruby interface to CouchDB. It takes its
> inspiration from ActiveRecord and offers a simple idiom for specifying
> object relationships. The underlying objects are persisted to CouchDB.
> Combined with the schema free nature of CouchDB, RelaxDB's current
> strength lies in quick prototyping of object models.
>
> More details on github
> http://github.com/paulcarey/relaxdb/wikis
>
> A basic merb plugin, merb_relaxdb is also available on github.
>
> Paul
>
> ====
>
> class Post < RelaxDB::Document
> property :created_at
> property :contents
>
> belongs_to :writer
> has_many :ratings, :class => "Rating"
> end
>
> class Rating < RelaxDB::Document
> property :thumbs_up, :validator => lambda { |tu| tu < 3 }
>
> belongs_to :post
> belongs_to :critic
> end
>
> post.ratings << Rating.new(:critic => gromit)
> Rating.all.sorted_by(:thumbs_up) { |q| q.key(2).count(1) }