Ruby driver for MongoDB
Go to file
Jim Menard 80475ff198 Clarified ByteBuffer.get behavior: get() returns one byte, get(1) returns array of length one. 2008-12-18 16:14:56 -05:00
bin db name command line arg 2008-12-08 16:58:16 -05:00
examples simplified example 2008-12-17 11:43:00 -05:00
lib Clarified ByteBuffer.get behavior: get() returns one byte, get(1) returns array of length one. 2008-12-18 16:14:56 -05:00
tests Clarified ByteBuffer.get behavior: get() returns one byte, get(1) returns array of length one. 2008-12-18 16:14:56 -05:00
.gitignore Rake rdoc task. 2008-12-04 16:38:04 -05:00
README.rdoc new Collection#options method 2008-12-17 13:52:10 -05:00
Rakefile Fixed rdoc task: README was renamed README.rdoc 2008-12-17 11:02:53 -05:00

README.rdoc

= Introduction

This is a simple pure-Ruby driver for the 10gen Mongo DB. For more information
about Mongo, see http://www.mongodb.org.

Note: this driver is still alpha quality. The API will change, as may the
data saved to the database (especially primary key values). Do *_not_* use this
for any production data yet.


= Demo

  $ ruby examples/simple.rb

Mongo must be running, of course.


= Testing

  $ rake test

The tests assume that the Mongo database is running on the default port.


= Documentation

  $ rake rdoc

Then open the file doc/index.html. (I need to figure out where to put this on
the Web, or perhaps how to publish this to the Wiki at
http://github.com/jimm/mongo-ruby-driver/wikis automatically.)


= The Code

Most of this code was transliterated from Geir Magnusson Jr's Java Mongo
driver, which can be found at
http://github.com/geir/mongo-java-driver/tree/master.

== Release Notes

Added "strict" db attribute.

I plan to remove the auto-generation of _id primary keys.

If you ran tests using code before release
http://github.com/jimm/mongo-ruby-driver/commit/4244f56ce6c7044a1ce096843eb991856422c0cc
then the DB API tests might fail the first time you run it. If that doesn't
clear up the failed test, you might have to delete your database. To do that,
type

  $ rm /data/db/ruby-mongo-test*


= To Do

* Tests for update and repsert.

* Add a way to specify a collection of databases on startup (a simple array of
  IP address/port numbers, perhaps, or a hash or something). The driver would
  then find the master and, on each subsequent command, ask that machine if it
  is the master before proceeding.

* Tests that prove that this driver's ObjectID and Geir's Java version do the
  same thing. (I've done so manually.)

* Capped collection support.

* Support more types: REF, SYMBOL, CODE_W_SCOPE, etc.

* Introduce optional per-database and per-collection PKInjector.

* Synchronization.

* More tests.

* Implement Admin.

* Study src/main/ed/db/{dbcollection,dbcursor,db}.js and ByteEncoder.java in
  the Babble code. That's what I should be writing to.


= Credits

Adrian Madrid, aemadrid@gmail.com
* examples/benchmarks.rb
* examples/irb.rb
* Modifications to examples/simple.rb
* Found plenty of bugs and missing features.
* Many other code suggestions and improvements.


= License

== Mongo Ruby Driver

Copyright (C) 2008 10gen Inc.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.

See http://www.gnu.org/licenses for a copy of the GNU Affero General Public
License.