Cassandro is a small Ruby ORM for Apache Cassandra 2.0 and CQL 3.0. Cassandro uses the new Datastax Ruby Driver
gem install cassandro
- Raise
Cassandra::Errors::ClientError
exception when trying to interact with Cassandra without a connection - SoftDelete Update: refactor
where
,count
andquery
methods to exclude deleted records by default.
- Fix
Model#count
for boolean fields
- Support
cassandra-driver
>= 2.0 - Allow registering indexes in model's definition
- Add
Model#ttl
method
- TTL
- Model-wide TTL
- Single record TTL
- Support
:set
datatype - Ignore columns not definied on model
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: '[email protected]', repos: 10, nickname: 'cassandro')
- Improve querying
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