Project

cassandro

0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Lightweight Apache Cassandra ORM for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.5.3, ~> 0.5
>= 0.6.3, ~> 0.6

Runtime

>= 2.0.0, ~> 2.1.3
 Project Readme

Cassandro Gem Version

Cassandro is a small Ruby ORM for Apache Cassandra 2.0 and CQL 3.0. Cassandro uses the new Datastax Ruby Driver

Install

gem install cassandro

Changelog

v2.1.0

  • Raise Cassandra::Errors::ClientError exception when trying to interact with Cassandra without a connection
  • SoftDelete Update: refactor where, count and query methods to exclude deleted records by default.

v2.0.1

  • Fix Model#count for boolean fields

v2.0

  • Support cassandra-driver >= 2.0
  • Allow registering indexes in model's definition
  • Add Model#ttl method

v1.2

  • TTL
  • Model-wide TTL
  • Single record TTL
  • Support :set datatype
  • Ignore columns not definied on model

Example

class Developer < Cassandro::Model
  table :developers
  
  attribute :email, :text
  attribute :repos, :integer
  attribute :nickname, :text
  
  primary_key [:id, :repos]
  
  index :nickname
end

Cassandro.connect(hosts: ['127.0.0.1'], keyspace: 'little_cassandro')

Developer.create(email: 'developer@dev.com', repos: 10, nickname: 'cassandro')

Documentation

TODO

  • Improve querying

How to collaborate

If you find a bug or want to collaborate with the code, you can:

  • Report issues trhough the issue tracker
  • Fork the repository into your own account and submit a Pull Request