Sha256: fcea8e8259a81667114f008ebb3b594fab692718659e7f93672f295a627b05f3

Contents?: true

Size: 1.35 KB

Versions: 2

Compression:

Stored size: 1.35 KB

Contents

= mongodoc

Version: 0.1 12/7/09

== Introduction

mongodoc is yet another ODM for MongoDB in Ruby.

Here is an example:

  require 'mongodoc'

  class Address < MongoDoc::Document
    key :street
    key :city
    key :state
    key :zip_code
  end

  class Contact < MongoDoc::Document
    key :name
    key :interests
    has_many :addresses
  end

  MongoDoc.connect
  contact = Contact.new(:name => 'Joe Strummer', :interests => ['music', 'art', 'acting'])
  contact.addresses << Address.new(:street => '1 Main Street', :city => 'Anywhere', :state => 'ID', :zip_code => '56789')
  contact.save

  Contact.criteria.in({'interests' => ['ruby', 'art']}).first
  Contact.criteria.where('addresses.state' => 'ID').first

== Installation

== Credits

Les Hill, leshill on github

mongodoc

=== Thanks

Thanks to Sandro and Durran for some great conversations and some lovely code.

== Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but
  bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2009 Les Hill. See LICENSE for details.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongodoc-0.1.1 README.rdoc
mongodoc-0.1.0 README.rdoc