Class: CassandraDB::Statements::Select
- 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: []) ⇒ Select
constructor
A new instance of Select.
Methods inherited from Base
Constructor Details
#initialize(table:, conditions: []) ⇒ Select
Returns a new instance of Select.
31 32 33 34 |
# File 'lib/cassandra_db/statements.rb', line 31 def initialize(table:, conditions:[]) @table = table @conditions = conditions end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
29 30 31 |
# File 'lib/cassandra_db/statements.rb', line 29 def conditions @conditions end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
29 30 31 |
# File 'lib/cassandra_db/statements.rb', line 29 def table @table end |
Instance Method Details
#arguments ⇒ Object
40 41 42 |
# File 'lib/cassandra_db/statements.rb', line 40 def arguments @arguments ||= conditions_agruments end |
#cql ⇒ Object
36 37 38 |
# File 'lib/cassandra_db/statements.rb', line 36 def cql @cql ||= "SELECT * FROM #{table} #{where_cql}".strip end |