class ROM::Cassandra::Query
Wraps the external CQL query builder
Constants
- DEFAULT_BUILDER
Default CQL statements builder
Public Class Methods
new(query = nil)
click to toggle source
Initializes the object carrying the lazy query
@param [ROM::Cassandra::Query] query
# File lib/rom/cassandra/query.rb, line 18 def initialize(query = nil) @query = query || DEFAULT_BUILDER end
Public Instance Methods
to_s()
click to toggle source
Builds the Query
statement from the wrapped query
@return [String]
# File lib/rom/cassandra/query.rb, line 26 def to_s @query.to_s end
Private Instance Methods
method_missing(name, *args)
click to toggle source
# File lib/rom/cassandra/query.rb, line 36 def method_missing(name, *args) updated_query = @query.public_send(name, *args) self.class.new(updated_query) end
respond_to_missing?(name, *)
click to toggle source
# File lib/rom/cassandra/query.rb, line 32 def respond_to_missing?(name, *) @query.respond_to? name end