Beispiel #1
0
 @Override
 public <V> V execute(
     String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler)
     throws TException {
   String formattedQuery = formatCqlQuery(query, queryParams, false);
   return handler
       .simpleNativeHandler()
       .apply(client.execute_cql_query(formattedQuery, key, Compression.NONE));
 }
Beispiel #2
0
 @Override
 public <V> V execute(
     Object preparedStatementId,
     ByteBuffer key,
     List<Object> queryParams,
     ResultHandler<V> handler)
     throws TException {
   Integer id = (Integer) preparedStatementId;
   return handler
       .simpleNativeHandler()
       .apply(client.execute_prepared_cql_query(id, key, toByteBufferParams(queryParams)));
 }
Beispiel #3
0
 @Override
 public Object createPreparedStatement(String cqlQuery) throws TException {
   return client.prepare_cql_query(cqlQuery, Compression.NONE);
 }