dock
TODO: Write a gem description dock is anything but simple. This gem outlines what the ORM Adapter should have been in terms of both methods and database support.
Support
NOTE:
Support may be dropped for datamapper and sinatra activerecord since the last update for these gems has been a while. The fraction shows the number of methods supported out of the total number of methods for dock all together for that adapter.
- 16/20 ActiveRecord
- 16/20 Sinatra ActiveRecord
- 16/20 CouchBase
- 0/20 CouchDB
- 16/20 Cequel
- 16/20 Datamapper
- 16/20 MongoMapper
- 16/20 Mongoid
- 16/20 NoBrainer
- 16/20 Sequel
Installation
Add this line to your application's Gemfile:
Note: until I can get the other dock removed, or change the name of this gem, this will be the only way to install this gem.
gem 'dock', :git => 'git://github.com/avecchio/dock.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dock
Contributing
WARNING: There are either methods missing in certain adapters, or other methdos that run on broken or untested code. So this gem is neither complete nor operational at the time being and will take some time to develop. Thus contributions are welcomed as well as additional adapters, methods and test code. But be warned, if you add a method to one adapter, you must create the same method for the rest of the adapters conforming to that adapters mechanics.
- Fork it ( https://github.com/[my-github-username]/dock/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Goals
- Tests need to be written
- Methods to all adapters need to be checked and verified and possibly re-written.
- Documentation!!
Usage
Getting Started
require 'dock'
Methods
user_model.create #
user_model.find #
user_model.find! #
user_model.all #
user_model.first #
user_model.id #
user_model.update #
user_model.destroy #
user_model.associations #
user_model.model_name #
user_model.column_names #
user_model.count # Count the number of results returned from the 'all' method
user_model.encoding #
user_model.belongs_to #
user_model.has_many #
user_model.scoped #
user_model. #
user_model.cyclic? #
user_model.supports_joins? #
user_model.properties #