No commit activity in last 3 years
No release in over 3 years
The rethinkDB is an interesting NoSQL massively scalable open source project. It may have some impact on the real-time processing community. This little gem is just a convention wrapper around the official rethinkdb. Its my conventions which are subject to change at a momments notice. I would not use this gem if I were you.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8
~> 10.0

Runtime

 Project Readme

RethinkdbHelper

My convention as a wrapper around the rethinkdb gem. Under Development. Don't use it.

This class is oriented around exploring the rethinkdb API.

I have not looked at the nobrainer gem yet. You ought to.

The rethinkdb-cli gem looks pretty simple. I'm thinking about putting a REPL into this helper gem as well. Maybe at a bin directory with a cli program that invokes the REPL.

Installation

Add this line to your application's Gemfile:

gem 'rethinkdb_helper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rethinkdb_helper

Usage

  db = RethinkdbHelper.new(
    host:   'localhost',  # default
    port:   28015,        # default
    db:     'test',       # default
    table:  'test',       # default
    drop:   false,        # default - drop/delete the db
    create_if_missing: true   # created db/table if they are missing
  )
  options={}
  db.insert([Hash, Hash, Hash ...], options) # takes array of hashes or json
  cursor = db.search(field_name: field_value_regex)
  cursor.each {|d| ap d}
  etc.

If you were to insert an actual JSON string it would not work. Of course being a wrapper and all that I could check the class and IF STRING then ASSUME its a JSON string then do a JSON.parse on it to get a Hash to pass to the native (sic.) #insert method of the rethinkdb.

Sometimes you must use symbols to access to the (Hash) document's fields. Other times in other methods the field name must be a string. Go figure.

Development

** Insert Fun Here **

Contributing

  1. Fork it ( https://github.com/MadBomber/rethinkdb_helper/fork )
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin new-feature)
  5. Create a new Pull Request