Fracassandra

Fracassandra is an object mapper for the Cassandra database.

Example usage

It can be used in familiar ways, for instance:

class User < Fracassandra::Model
  column_family :Users

  attribute :username, :key => true
  attribute :password
  attribute :salt
  attribute :email
end

or with super columns:

class Group < Fracassandra::Model
  column_family :Groups

  attribute :id, :key => true

list :name, :columns => [:index, :username]

end

This will create a class suitable for use with the Cassandra mapping, using the username as the key to the column family, storing a bunch of columns (password, salt and email respectively). Each attribute will respond to a getter with the same name, and a setter with the same name. One exception is the :key attribute, which is immutable, and cannot be modified. As such, an exception is thrown if you try and use the setter.

Contributing to Fracassandra

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Jeremy Tregunna. See LICENSE.txt for further details.