In order to run this examples you need a Cassandra instance running locally.
On the ways to achieve this is to use ccm.
Follow the installation instructions for installing ccm
.
After ccm
installation you can run a single node Cassandra cluster:
ccm create test_node -v 3.11.2 -n 1 -s
ccm start test_node
This example consists of executing a single query: select release_version from system.local
.
As the first row is obtained, the current Cassandra version is printed out.
This example demonstrates how can you prepare, execute and fetch results of a query.
This example shows a way to fetch query result rows in a streaming manner.