Protocol::CassandraCQL - wire protocol support functions for Cassandra CQL
Protocol::CassandraCQL
This module provides the basic constants and other support functions required to communicate with a Cassandra database using CQL. It is not in itself a CQL client; it simply provides the necessary support functions to allow one to be written. It supports the additions added by CQL version 2.
CQL
For a complete client, see instead Net::Async::CassandraCQL.
The following families of constants are defined, along with export tags:
Bitmask of flags used in message frames.
Opcodes used in message frames.
Flag constants used in OPCODE_QUERY frames.
OPCODE_QUERY
Type constants used in OPCODE_BATCH frames.
OPCODE_BATCH
Result codes used in OPCODE_RESULT frames.
OPCODE_RESULT
Flag constants used in RESULT_ROWS frames.
RESULT_ROWS
Type codes used in TYPE_ROWS and TYPE_PREPARED column metadata.
TYPE_ROWS
TYPE_PREPARED
Consistency levels used in OPCODE_QUERY and OPCODE_EXECUTE frames.
OPCODE_EXECUTE
Attempts to parse a complete message frame from the given byte string. If it succeeds, it returns the header fields and the body as an opaque byte string. If it fails, it returns an empty list.
If successful, it will remove the bytes of the message from the $bytes scalar, which must therefore be mutable.
$bytes
Attempts to read a complete frame from the given filehandle, blocking until it is available. If an IO error happens, returns an empty list. The results are undefined if this method is called on a non-blocking filehandle.
Returns a byte string containing a complete message with the given fields as the header and body.
Sends a complete frame to the given filehandle.
Returns the CONSISTENCY_* value for the given name (without the initial CONSISTENCY_ prefix).
CONSISTENCY_*
CONSISTENCY_
Returns the name of the given TYPE_* value, without the initial TYPE_ prefix.
TYPE_*
TYPE_
Reimplement Protocol::CassandraCQL::Frame in XS code for better performance.
This code was paid for by
Perceptyx http://www.perceptyx.com/
Shadowcat Systems http://www.shadow.cat
Paul Evans <leonerd@leonerd.org.uk>
To install Protocol::CassandraCQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Protocol::CassandraCQL
CPAN shell
perl -MCPAN -e shell install Protocol::CassandraCQL
For more information on module installation, please visit the detailed CPAN module installation guide.