Class: CassandraDB::Statements::Delete
- Defined in:
- lib/cassandra_db/statements.rb
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #arguments ⇒ Object
- #cql ⇒ Object
-
#initialize(table:, conditions:) ⇒ Delete
constructor
A new instance of Delete.
Methods inherited from Base
Constructor Details
#initialize(table:, conditions:) ⇒ Delete
Returns a new instance of Delete.
105 106 107 108 |
# File 'lib/cassandra_db/statements.rb', line 105 def initialize(table:, conditions:) @table = table @conditions = conditions end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
103 104 105 |
# File 'lib/cassandra_db/statements.rb', line 103 def conditions @conditions end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
103 104 105 |
# File 'lib/cassandra_db/statements.rb', line 103 def table @table end |
Instance Method Details
#arguments ⇒ Object
114 115 116 |
# File 'lib/cassandra_db/statements.rb', line 114 def arguments @arguments ||= conditions_agruments end |
#cql ⇒ Object
110 111 112 |
# File 'lib/cassandra_db/statements.rb', line 110 def cql @cql ||= "DELETE FROM #{table} #{where_cql}" end |