Questions tagged [cequel]

Cequel is a Ruby ORM for Cassandra using CQL3.

Cequel

Cequel is a Ruby ORM for Cassandra using CQL3.

Gem Version Build Status Dependency Status Code Climate Inline docs http://inch-ci.org/github/cequel/cequel.png

Cequel::Record is an ActiveRecord-like domain model layer that exposes the robust data modeling capabilities of CQL3, including parent-child relationships via compound primary keys and collection columns.

The lower-level Cequel::Metal layer provides a CQL query builder interface inspired by the excellent Sequel library.

See the ruby gem : https://github.com/cequel/cequel

22 questions
3
votes
0 answers

Getting an error when trying to save a table entry

I have a problem when trying to create a simple list of projects. First I defined the model with three columns which should belong to a compound key. class Project include Cequel::Record key :client, :text, { partition: true } key :type,…
Daniel82
  • 101
  • 7
2
votes
0 answers

ArgumentError with Cequel and Ruby3 / Rails 6

I have updated a former project from Ruby 2.5 / Rails 5.2 to Ruby 3.0 and Rails 6.1 The server starts, but when I reached it, I have this error : ArgumentError (Delegation needs a target. Supply a keyword argument 'to' (e.g. delegate :hello, to:…
Petithomme
  • 21
  • 1
2
votes
0 answers

NoMethodError: undefined method `key_columns' for #

I'm new at rails and also cequel. I have existing model witch was genearted on Postgres and now i'm trying to migrate it to the Cassandra. 1. I would just like to migrate one of my model and other i would like to leave on Postgres. Is this…
2
votes
1 answer

Defining table compound primary keys in rails for Cassandra

Given the following pseudo-cql table structure: CREATE TABLE searches ( category text, timestamp timestamp, no_of_searches int, avg_searches double, PRIMARY KEY((category, timestamp), no_of_searches) ); and the following Rails Cequel…
sWright
  • 65
  • 1
  • 5
1
vote
0 answers

Cannot connect Amazon Keyspaces using rails CQL

I'm using the below configuration in the rails config/cequel.yml. development: host: 'cassandra.ap-south-1.amazonaws.com' username: 'username' password: 'password' port: 9142 keyspace: 'keyspace' max_retries: 3 retry_delay: 0.5 …
Neeraj Sharma
  • 73
  • 1
  • 6
1
vote
1 answer

Rails CQL cannot connect to AWS Keyspaces (AWS Cassandra)

I am trying to connect from a Ruby on Rails application to AWS Keyspaces (AWS Cassandra), but I cannot manage to do it. I use the cequel gem and generated the config/cequel.yml which contains a similar thing to the following: development: host:…
1
vote
1 answer

SystemStackError trying to call `.to_yaml` in a cequel object

I started to work in a legacy project and if I try to find a cequel record and then convert it to yaml: fj = FullJob.find(1) fj.to_yaml I'm getting a stack level too deep error. Checking deeper, there's a @record_collection instance variable…
Alter Lagos
  • 12,090
  • 1
  • 70
  • 92
1
vote
1 answer

Ruby - Counter table with Cequel

I've started using Cequel in a project and I can't figure out how to work the Counters table. I have the following definition: class Counter include Cequel::Record key :user_id, :text column :text, :counter column :int, :counter column…
Tamar
  • 2,016
  • 1
  • 15
  • 26
1
vote
1 answer

Cequel Gem for Ruby without Rails. How to load configuration?

I am attempting to setup Cequel Gem for use with my existing Ruby app. From what I can tell, the Cequel gem requires the railtie to configure it to use the configuration (as my cequel.yml is in the same place as it is in Rails). But, it seems the…
1
vote
1 answer

CQL Cassandra Missing mandatory PRIMARY KEY part id

I'm trying to create a record and I'm getting this error. [40] pry(main)> a = TopicPost.new(topic_id: "professional_safety", pub_date: "5a612420-21e2-11e6-bdf4-0800200c9a66") => #
Brian Lau
  • 127
  • 14
1
vote
0 answers

How to store dynamically generated ruby has to cassandra using cequel?

For example i have a ruby hash with n number of items in it, how do i dyamically store them to cassandra using cequel. Everytime the hash is going to be different depending upon what activity user is doing.
Ravi D
  • 863
  • 8
  • 16
1
vote
1 answer

How to create Cassandra tables with cequel (without using rails)

I am using Cequel as ORM for Cassandra without rails. I have a problem when trying to create a simple list of projects. First I defined the model with three columns which should belong to a compound key. class Project include Cequel::Record key…
Daniel82
  • 101
  • 7
1
vote
1 answer

Rails, Cequel - Don't know how to cast to a UUID

I'm following this tutorial (https://medium.com/@olance/rails-4-user-authentication-with-cequel-and-devise-86e1c9ccbcd0), but I'm having problems with the login. When I receive the following error: ArgumentError in HomeController#index Don't know…
estebarb
  • 467
  • 5
  • 12
1
vote
2 answers

Querying Cassandra in Rails by Cequel

I am using Cequel in Rails. I would like to query something like Event.where("started_at >?", Time.now) in ActiveRecord. But I don't know how to do that in cequel.
kfcoder
  • 41
  • 5
0
votes
1 answer

ArgumentError when calling directly a query with cequel

I've just updated cequel from 1.10.0 to 3.2.1 and I'm having the following model: module Messaging class ThreadsForUser include Cequel::Record include Sunspot::Cequel self.table_name = :messaging_threads_for_users key :user_id,…
Alter Lagos
  • 12,090
  • 1
  • 70
  • 92
1
2