CQL provides an API to Cassandra that is simpler than the Thrift API for new applications. The Thrift API and legacy versions of CQL expose the internal storage structure of Cassandra. CQL adds an abstraction layer that hides implementation details of this structure and provides native syntaxes for collections and other common encodings.
You can use CQL on the command line of a Cassandra node, from DataStax DevCenter, or programmatically using a number of APIs and drivers. Common ways to access CQL are:
- Start cqlsh, the Python-based command-line client, on the command line of a Cassandra node.
- Use DataStax DevCenter, a graphical user interface.
Use a DataStax driver for programmatic access.
DataStax Java Driver 2.0.0
Compatible with Cassandra 2.0/CQL 3.1 specification and Cassandra 1.2/CQL 3.0 specification. Supports a smooth upgrade to Cassandra 2.0.
DataStax Java Driver 1.0.x
Based on the native/binary protocol version 1, this driver accesses the CQL 3 version based on the CQL 3.0 specification, the default CQL mode in Cassandra 1.2. Use of the driver is limited for CQL applications based on the CQL 3.1 specification, the default CQL mode in Cassandra 2.0. This driver includes support for upgrading nodes in mixed-version clusters when the next generation driver is available.
- DataStax C# Driver 1.0.x
- DataStax Python Driver 1.0.x
- DataStax Java Driver 2.0.0
- Use the set_cql_version Thrift method for programmatic access.
This document presents examples using cqlsh.