Initial cursor implementation and related features #26

Merged
merged 21 commits into from Jul 16, 2011

Projects

None yet

1 participant

@PlasticLizard
Collaborator

I have more I want to do, such as porting support for indexes, updating the read-me and adding a synchrony wrapper, but what I have so far is tested and documented (via RDOC), and can add some value now.

EDIT - I added index support, and am not going to attempt to provide synchrony support here - I realized the best place for that is the em-synchrony project, so I have an adapter ready in a fork of that project that matches the new API and will submit a pull request later

I realize there is a lot of change here - please let me know if there are any changes you want me to make (stylistic, structural or otherwise), or if you have any questions about the implementation.

As I said before, there are breaking changes here.

  1. The connection object no longer has CRUD methods. These exist only on the collection
  2. All calls that block for IO return a deferrable, and no longer accept a block directly
  3. the Find methods do NOT return deferrables because they return a cursor. As with the official driver network IO takes place until a method on the cursor is called.
PlasticLizard added some commits Jul 2, 2011
@PlasticLizard PlasticLizard Initial cursor implementation & tests 5f87497
@PlasticLizard PlasticLizard Finished up cursor tests, and added simple tests for db.command a059932
@PlasticLizard PlasticLizard Ported a selection of db helper methods and tests from official driver 270ddc4
@PlasticLizard PlasticLizard Moved CRUD operations into collection and out of connection. Started …
…the process of fleshing out Collection with select methods from the mongo-ruby driver
148ed7a
@PlasticLizard PlasticLizard Added distinct and group commands to collection 0feccee
@PlasticLizard PlasticLizard Ensure errback is subscribed to in all async calls so errors can't ge…
…t swollowed and synchrony style interactions won't hang
9b8026a
@PlasticLizard PlasticLizard Added RDOC comments for most public methods that were missing them, a…
…nd made an attempt to adjust the comments to match the ported versions of the methods.
ac70b4b
@PlasticLizard PlasticLizard Replace EM::DefaultDeferrable with a custom deferrable, to make integ…
…ration with EM::Synchrony more elegant and generally make the callback mechanism more flexible
029dac8
@PlasticLizard PlasticLizard Reverted the use of deferrables in the connection send_command method…
… to fix a memory leak. Cleaned up some over-zealous usages of deferrables where they weren't adding any value
5bb5385
@PlasticLizard PlasticLizard Added support for index management 7de62e2
@PlasticLizard PlasticLizard Added 'safe_(insert,update,save)' methods to emulate the ruby driver …
…where :safe => true.
68003ad
@PlasticLizard PlasticLizard Working on README for new version 1a8678f
@PlasticLizard PlasticLizard More readme 5d88f68
@PlasticLizard PlasticLizard Add readme examples to an examples folder, make sure the readme examp…
…le really works
9acc283
@PlasticLizard PlasticLizard readme tweaks 10b5d95
@PlasticLizard PlasticLizard Readme tweaks 5fbabdd
@PlasticLizard PlasticLizard Readme tweaks dffe290
@PlasticLizard PlasticLizard Update the changelog, updated the YARD docs to represent that Request…
…Response(s) will be returned instead of real values where applicable, added a backwards compatibility file (prev.rb) as well as an example of using that file to revert to the previous API
6e19565
@PlasticLizard PlasticLizard Remove dead attributes left over from the port 5f22065
@PlasticLizard PlasticLizard README tweak bb0f3bf
@PlasticLizard PlasticLizard README tweak 49e4926
@PlasticLizard PlasticLizard merged commit 0b395f4 into bcg:master Jul 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment