class QueryBuilder::CQL::Statements::CreateIndex
Describes the ‘CREATE INDEX’ CQL3 statement
Public Instance Methods
to_s()
click to toggle source
Builds the statement
@return [String]
# File lib/query_builder/cql/statements/create_index.rb, line 20 def to_s cql[ "CREATE", maybe_custom, "INDEX", maybe_if, maybe_name, "ON", context.table.to_s, maybe_columns, maybe_using, maybe_with ] end
Private Instance Methods
maybe_custom()
click to toggle source
# File lib/query_builder/cql/statements/create_index.rb, line 33 def maybe_custom "CUSTOM" unless maybe_name end
maybe_name()
click to toggle source
# File lib/query_builder/cql/statements/create_index.rb, line 29 def maybe_name context.name.to_s if context.name end