Sha256: ceb12cd089c982e694331eaa44479c1a9e80d780e2f7d4c10348f01be0ee921e

Contents?: true

Size: 350 Bytes

Versions: 9

Compression:

Stored size: 350 Bytes

Contents

module Cassanity
  module ArgumentGenerators
    class ColumnFamilyTruncate

      # Internal
      def call(args = {})
        name = args.fetch(:column_family_name)

        if (keyspace_name = args[:keyspace_name])
          name = "#{keyspace_name}.#{name}"
        end

        cql = "TRUNCATE #{name}"
        [cql]
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cassanity-0.6.0 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.6.0.beta5 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.6.0.beta4 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.6.0.beta3 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.6.0.beta2 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.6.0.beta1 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.5.1 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.5.0 lib/cassanity/argument_generators/column_family_truncate.rb
cassanity-0.4.0 lib/cassanity/argument_generators/column_family_truncate.rb