Class: Believer::Delete
- Inherits:
-
ScopedCommand
- Object
- Command
- ScopedCommand
- Believer::Delete
- Defined in:
- lib/believer/delete.rb
Instance Attribute Summary
Attributes inherited from ScopedCommand
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from ScopedCommand
Methods inherited from Command
#clone, #connection, #execute, #initialize, #query_attributes
Constructor Details
This class inherits a constructor from Believer::Command
Instance Method Details
#to_cql ⇒ Object
4 5 6 7 8 |
# File 'lib/believer/delete.rb', line 4 def to_cql cql = "DELETE FROM #{@record_class.table_name}" cql << " WHERE #{@wheres.map { |wc| "#{wc.to_cql}" }.join(' AND ')}" if @wheres && @wheres.any? cql end |