- $result = Protocol::CassandraCQL::Result->from_frame( $frame )
- $result = Protocol::CassandraCQL::Result->new( %args )
- $n = $result->rows
- $data = $result->row_array( $idx )
- $data = $result->row_hash( $idx )
- @data = $result->rows_array
- @data = $result->rows_hash
- $map = $result->rowmap_array( $keyidx )
- $map = $result->rowmap_hash( $keyname )
Protocol::CassandraCQL::Result - stores the result of a Cassandra CQL query
Objects in this class store the result of a direct query or executed prepared statement, as returned by an
RESULT_ROWS. It allows convenient access to the decoded row data.
As a subclass of Protocol::CassandraCQL::ColumnMeta it also provides information about column metadata, such as column names and types.
Returns a new result object initialised from the given
RESULT_ROWS message frame.
Returns a new result object initialised directly from the given row data. This constructor is intended for use by unit test scripts, to create results directly from mocked connection objects or similar.
In addition to the arguments taken by the superclass constructor, it takes the following named arguments:
Returns the number of rows
Returns the row's data decoded, as an ARRAY reference
Returns the row's data decoded, as a HASH reference mapping column short names to values.
Returns a list of all the rows' data decoded as ARRAY references.
Returns a list of all the rows' data decoded as HASH references.
Returns a HASH reference mapping keys to rows deccoded as ARRAY references.
$keyidx gives the column index of the value to use as the key in the returned map.
Returns a HASH reference mapping keys to rows decoded as HASH references.
$keyname gives the column shortname of the value to use as the key in the returned map.
This code was paid for by
Paul Evans <firstname.lastname@example.org>