module QueryBuilder::CQL::Modifiers::Alter
Provides WITH clauses for statements like ALTER TABLE
Public Instance Methods
alter(options)
click to toggle source
Adds WITH clause to the statement
@param [Hash] options
@return [QueryBuilder::Core::Statement] updated statement
# File lib/query_builder/cql/modifiers/alter.rb, line 17 def alter(options) options .map { |key, value| Clause.new(column: key, value: value) } .inject(self, :<<) end
Private Instance Methods
maybe_with()
click to toggle source
# File lib/query_builder/cql/modifiers/alter.rb, line 25 def maybe_with list = clauses(:with) ["WITH", list.join(" AND ")] if list.any? end