NoBrainer is an ORM for RethinkDB. The goal of NoBrainer is to provide a similar interface compared to ActiveRecord and Mongoid to build data models on top of RethinkDB while providing precise semantics. Nevertheless, NoBrainer breaks a couple of established patterns to provide a consistent API. You may read more about these differences in the next section.
NoBrainer is written and maintained by Nicolas Viennot.
NoBrainer depends on a couple of things:
- The RethinkDB database.
- NoBrainer runs on Ruby MRI 2.x.
- NoBrainer does not depend on Rails, but plays nicely with Rails 4 and Rails 5.
- NoBrainer depends on the
middlewaregems. These dependencies are automatically pulled in when you install the
Roadmap & Changelog
Latest gem version: 0.32.0 – June 5, 2016.
The following assume you are using a Rails application, and that you are running a RethinkDB instance locally.
To install NoBrainer, add the
nobrainer gem in your
# Gemfile gem 'nobrainer'
When using NoBrainer with Rails, NoBrainer comes with a set of default settings that allow you to start using NoBrainer right away without making any further configuration or database migrations.
Declare a model in
class User include NoBrainer::Document field :name field :email end
In a Rails console, you can create models which will be persisted to the database:
User.create(:name => 'Nico', :email => 'email@example.com') User.count # returns 1
A Rails application example using NoBrainer can be found here.