Class: Cequel::Schema::Patch::AddIndex

Inherits:
AbstractChange show all
Defined in:
lib/cequel/schema/patch.rb

Overview

Since:

  • 1.0.0

Instance Attribute Summary collapse

Attributes inherited from AbstractChange

#table

Instance Method Summary collapse

Methods inherited from AbstractChange

#==, #eql?, #inspect

Instance Attribute Details

#columnObject (readonly)

Since:

  • 1.0.0



100
101
102
# File 'lib/cequel/schema/patch.rb', line 100

def column
  @column
end

#index_nameObject (readonly)

Since:

  • 1.0.0



100
101
102
# File 'lib/cequel/schema/patch.rb', line 100

def index_name
  @index_name
end

Instance Method Details

#to_cqlObject

Since:

  • 1.0.0



102
103
104
# File 'lib/cequel/schema/patch.rb', line 102

def to_cql
  %Q|CREATE INDEX "#{index_name}" ON "#{table.name}" ("#{column.name}")|
end