Class: CassandraDB::Statements::Delete

Inherits:
Base
  • Object
show all
Defined in:
lib/cassandra_db/statements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#options, #to_s

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

#conditionsObject (readonly)

Returns the value of attribute conditions.



103
104
105
# File 'lib/cassandra_db/statements.rb', line 103

def conditions
  @conditions
end

#tableObject (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

#argumentsObject



114
115
116
# File 'lib/cassandra_db/statements.rb', line 114

def arguments
  @arguments ||= conditions_agruments
end

#cqlObject



110
111
112
# File 'lib/cassandra_db/statements.rb', line 110

def cql
  @cql ||= "DELETE FROM #{table} #{where_cql}"
end