Query builder

The query builder class helps to create executable CQL statements dynamically without resorting to building query strings by hand.

Examples

Here is an example that creates a select all statement from the specified schema and returns all the rows.

public ResultSet getRows(String keyspace, String table) {
   Query query = QueryBuilder
      .select()
      .all()
      .from(keyspace, table);
   return getSession()
      .execute(query)
      .getAll();
}