Method: Cql::Model::Query::SelectStatement#execute

Defined in:
lib/cql/model/query/select_statement.rb

#execute {|row| ... } ⇒ true Also known as: each_row

Execute this SELECT statement on the CQL client connection and yield each row of the result set as a raw-data Hash.

Yields:

  • each row of the result set

Yield Parameters:

  • row (Hash)

    a Ruby Hash representing the column names and values for a given row

Returns:

  • (true)

    always returns true



123
124
125
126
127
# File 'lib/cql/model/query/select_statement.rb', line 123

def execute(&block)
  @client.execute(to_s).each_row(&block).size

  true
end