Skip to content

tarolandia/cassandro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby ORM for Apache Cassandra

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages