NAME

Protocol::CassandraCQL::Result - stores the result of a Cassandra CQL query

DESCRIPTION

Objects in this class store the result of a direct query or executed prepared statement, as returned by an OPCODE_RESULT giving 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.

CONSTRUCTOR

$result = Protocol::CassandraCQL::Result->from_frame( $frame )

Returns a new result object initialised from the given OPCODE_RESULT / RESULT_ROWS message frame.

$n = $result->rows

Returns the number of rows

@columns = $result->rowbytes( $idx )

Returns a list of the raw bytestrings containing the row's data

$data = $result->row_array( $idx )

Returns the row's data decoded, as an ARRAY reference

$data = $result->row_hash( $idx )

Returns the row's data decoded, as a HASH reference mapping column short names to values.

SPONSORS

This code was paid for by

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>