My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Wiki pages
Links

A JDBC-compliant driver for Cassandra using CQL.

Typical Use

import java.sql.Connection;
import java.sql.PreparedStatement;

...

    Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver");
    Connection con = DriverManager.getConnection("jdbc:cassandra://localhost:9170/Keyspace1");

    String query = "UPDATE Test SET a=?, b=? WHERE KEY=?";
    PreparedStatement statement = con.prepareStatement(query);

    statement.setLong(1, 100);
    statement.setLong(2, 1000);
    statement.setString(3, "key0");

    statement.executeUpdate();

    statement.close();
Powered by Google Project Hosting