Class: DatastaxRails::Cql::Truncate

Inherits:
Base show all
Defined in:
lib/datastax_rails/cql/truncate.rb

Overview

CQL generation for TRUNCATE

Instance Method Summary collapse

Methods inherited from Base

#execute, #using

Constructor Details

#initialize(klass) ⇒ Truncate

Returns a new instance of Truncate


5
6
7
8
# File 'lib/datastax_rails/cql/truncate.rb', line 5

def initialize(klass)
  @klass = klass
  super
end

Instance Method Details

#to_cqlObject


10
11
12
# File 'lib/datastax_rails/cql/truncate.rb', line 10

def to_cql
  "TRUNCATE #{@klass.column_family}"
end