Module: Eurydice::Pelops::ConsistencyLevelHelpers

Included in:
ColumnFamily, Keyspace, Mutator
Defined in:
lib/eurydice/pelops.rb

Instance Method Summary collapse

Instance Method Details

#default_cl?(options) ⇒ Boolean

Returns:

  • (Boolean)


137
138
139
# File 'lib/eurydice/pelops.rb', line 137

def default_cl?(options)
  !(options.key?(:consistency_level) || options.key?(:cl))
end

#get_cl(options) ⇒ Object



132
133
134
135
# File 'lib/eurydice/pelops.rb', line 132

def get_cl(options)
  cl = options.fetch(:consistency_level, options.fetch(:cl, :one))
  Cassandra::CONSISTENCY_LEVELS[cl]
end