Sha256: 67e3a59d42ececfefcd6f221cda5fcfa85c5cd5f9b6bbbdf3abae7ed23061f93

Contents?: true

Size: 487 Bytes

Versions: 6

Compression:

Stored size: 487 Bytes

Contents

require 'cassanity/column_family'

module Cassanity
  module ResultTransformers
    class Keyspaces

      # Internal: Turns result into Array of keyspaces.
      def call(result, args = {})
        keyspaces = []
        result.each do |row|
          name = row['name'] || row['keyspace'] || row['keyspace_name']
          keyspaces << Keyspace.new({
            name: name,
            executor: args[:executor],
          })
        end
        keyspaces
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cassanity-0.6.0 lib/cassanity/result_transformers/keyspaces.rb
cassanity-0.6.0.beta5 lib/cassanity/result_transformers/keyspaces.rb
cassanity-0.6.0.beta4 lib/cassanity/result_transformers/keyspaces.rb
cassanity-0.6.0.beta3 lib/cassanity/result_transformers/keyspaces.rb
cassanity-0.6.0.beta2 lib/cassanity/result_transformers/keyspaces.rb
cassanity-0.6.0.beta1 lib/cassanity/result_transformers/keyspaces.rb