Exemplo n.º 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));
 }
Exemplo n.º 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)));
 }
Exemplo n.º 3
0
 @Override
 public Object createPreparedStatement(String cqlQuery) throws TException {
   return client.prepare_cql_query(cqlQuery, Compression.NONE);
 }