예제 #1
0
 /**
  * Prepares the provided query.
  *
  * @param query the CQL query to prepare
  * @return the prepared statement corresponding to {@code query}.
  * @throws NoHostAvailableException if no host in the cluster can be contacted successfully to
  *     execute this query.
  */
 public PreparedStatement prepare(String query) {
   Connection.Future future = new Connection.Future(new PrepareMessage(query));
   manager.execute(future, Query.DEFAULT);
   return toPreparedStatement(query, future);
 }
예제 #2
0
 /**
  * Prepare the provided query.
  *
  * @param query the CQL query to prepare
  * @return the prepared statement corresponding to {@code query}.
  * @throws NoHostAvailableException if no host in the cluster can be contacted successfully to
  *     execute this query.
  */
 public PreparedStatement prepare(String query) throws NoHostAvailableException {
   Connection.Future future = new Connection.Future(new PrepareMessage(query));
   manager.execute(future, Query.DEFAULT);
   return toPreparedStatement(query, future);
 }