Class: CassandraDB::Statements::Insert
- Defined in:
- lib/cassandra_db/statements.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #arguments ⇒ Object
- #cql ⇒ Object
-
#initialize(table:, attributes:) ⇒ Insert
constructor
A new instance of Insert.
Methods inherited from Base
Constructor Details
#initialize(table:, attributes:) ⇒ Insert
Returns a new instance of Insert.
50 51 52 53 |
# File 'lib/cassandra_db/statements.rb', line 50 def initialize(table:, attributes:) @table = table @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
48 49 50 |
# File 'lib/cassandra_db/statements.rb', line 48 def attributes @attributes end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
48 49 50 |
# File 'lib/cassandra_db/statements.rb', line 48 def table @table end |
Instance Method Details
#arguments ⇒ Object
59 60 61 |
# File 'lib/cassandra_db/statements.rb', line 59 def arguments attributes end |
#cql ⇒ Object
55 56 57 |
# File 'lib/cassandra_db/statements.rb', line 55 def cql @cql ||= "INSERT INTO #{table} (#{field_names}) VALUES (#{field_references})" end |