예제 #1
0
 @Override
 public <V> V execute(
     String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler) {
   String formattedQuery = formatCqlQuery(query, queryParams, isCql3());
   return handler
       .thriftHandler()
       .apply(
           client.execute(
               formattedQuery, ThriftConversion.fromThrift(settings.command.consistencyLevel)));
 }
예제 #2
0
 @Override
 public <V> V execute(
     Object preparedStatementId,
     ByteBuffer key,
     List<Object> queryParams,
     ResultHandler<V> handler) {
   return handler
       .thriftHandler()
       .apply(
           client.executePrepared(
               (byte[]) preparedStatementId,
               toByteBufferParams(queryParams),
               ThriftConversion.fromThrift(settings.command.consistencyLevel)));
 }
예제 #3
0
 @Override
 public Object createPreparedStatement(String cqlQuery) {
   return client.prepare(cqlQuery).statementId.bytes;
 }