コード例 #1
0
ファイル: Session.java プロジェクト: ptolemeza/java-driver
 /**
  * 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
ファイル: Session.java プロジェクト: zznate/java-driver
 /**
  * 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);
 }