Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  PROTOCOL::CASSANDRACQL (3)

.ds Aq ’


"Protocol::CassandraCQL" - wire protocol support functions for Cassandra CQL



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.

For a complete client, see instead Net::Async::CassandraCQL.


The following families of constants are defined, along with export tags:

    FLAG_* (:flags)

Bitmask of flags used in message frames.

    OPCODE_* (:opcodes)

Opcodes used in message frames.

    QUERY_* (:queryflags)

Flag constants used in OPCODE_QUERY frames.

    BATCH_* (:batches)

Type constants used in OPCODE_BATCH frames.

    RESULT_* (:results)

Result codes used in OPCODE_RESULT frames.

    ROWS_* (:rowflags)

Flag constants used in RESULT_ROWS frames.

    TYPE_* (:types)

Type codes used in TYPE_ROWS and TYPE_PREPARED column metadata.

    CONSISTENCY_* (:consistencies)

Consistency levels used in OPCODE_QUERY and OPCODE_EXECUTE frames.


( CW$version, CW$flags, CW$streamid, CW$opcode, CW$body ) = parse_frame( CW$bytes )

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.

( CW$version, CW$flags, CW$streamid, CW$opcode, CW$body ) = recv_frame( CW$fh )

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.

CW$bytes = build_frame( CW$version, CW$flags, CW$streamid, CW$opcode, CW$body )

Returns a byte string containing a complete message with the given fields as the header and body.

send_frame( CW$fh, CW$version, CW$flags, CW$streamid, CW$opcode, CW$body )

Sends a complete frame to the given filehandle.

CW$consistency = lookup_consistency( CW$name )

Returns the CONSISTENCY_* value for the given name (without the initial CONSISTENCY_ prefix).

CW$name = typename( CW$type )

Returns the name of the given TYPE_* value, without the initial TYPE_ prefix.


o Reimplement Protocol::CassandraCQL::Frame in XS code for better performance.
o Support 64bit-challenged perls by using Math::BigInt for 64bit values


This code was paid for by
o Perceptyx <>
o Shadowcat Systems <>


Paul Evans <>
Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 PROTOCOL::CASSANDRACQL (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.