Sha256: e38cc2bd0cfc8be3f2e995f1ade2d166e1a9b4a6835a696d522b402af8d71fb4

Contents?: true

Size: 467 Bytes

Versions: 116

Compression:

Stored size: 467 Bytes

Contents

module CassandraObject
  module Connection
    extend ActiveSupport::Concern
    
    included do
      class_attribute :connection
    end

    module ClassMethods
      DEFAULT_OPTIONS = {
        servers: "127.0.0.1:9160",
        thrift: {}
      }
      def establish_connection(spec)
        spec.reverse_merge!(DEFAULT_OPTIONS)
        self.connection = Cassandra.new(spec[:keyspace], spec[:servers], spec[:thrift].symbolize_keys!)
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 2 rubygems

Version Path
sessionm-cassandra_object-2.2.55 lib/cassandra_object/connection.rb
gotime-cassandra_object-3.0.5 lib/cassandra_object/connection.rb
gotime-cassandra_object-3.0.4 lib/cassandra_object/connection.rb
gotime-cassandra_object-3.0.3 lib/cassandra_object/connection.rb
gotime-cassandra_object-3.0.2 lib/cassandra_object/connection.rb
gotime-cassandra_object-3.0.1 lib/cassandra_object/connection.rb
gotime-cassandra_object-3.0.0 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.13.0 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.12.5 lib/cassandra_object/connection.rb
sessionm-cassandra_object-2.2.54 lib/cassandra_object/connection.rb
sessionm-cassandra_object-2.2.53 lib/cassandra_object/connection.rb
sessionm-cassandra_object-2.2.52 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.12.4 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.12.3 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.12.2 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.12.1 lib/cassandra_object/connection.rb
sessionm-cassandra_object-2.2.51 lib/cassandra_object/connection.rb
sessionm-cassandra_object-2.2.50 lib/cassandra_object/connection.rb
gotime-cassandra_object-2.12.0 lib/cassandra_object/connection.rb
sessionm-cassandra_object-2.2.49 lib/cassandra_object/connection.rb