Supported ORMs

Currently supported ORMs are ActiveRecord, DataMapper,
MongoMapper, and MongoId.

We welcome you to write new adapters as gems. ORM Adapter will stay focused
in having these major ORMs working. Other adapters will be named
orm_adapter-somedatabase, you can find the ones available on rubygems.

To write an adapter look at
lib/orm_adapter/adapters/active_record.rb for an example of
implementation. To see how to test it, look at
spec/orm_adapter/example_app_shared.rb,
spec/orm_adapter/adapters/active_record_spec.rb. You'll need
to require the target ORM in spec/spec_helper.rb

Goals

ORM Adapter's goal is to support a minimum API used by most of the
plugins that needs agnosticism beyond Active Model.

ORM Adapter will support only basic methods, as get,
find_first, create! and so forth. It is not ORM
Adapter's goal to support different query constructions, handle table
joins, etc.

ORM adapter provides a consistent API for these basic class or
'factory' methods. It does not attempt to unify the behaviour of
model instances returned by these methods. This means that unifying the
behaviour of methods such as `model.save`, and `model.valid?` is beyond the
scope of orm_adapter.

If you need complex queries, we recommend you to subclass ORM Adapters in
your plugin and extend it expressing these query conditions as part of your
domain logic.