val dbConn = stub[DataBaseConnection]
val dbSession = stub[Session]
(dbConn.getSession: () => Session).when().returns(dbSession)val selectResult: ResultSet = stub[ResultSet]
val rows = new util.ArrayList[Row]();
val row = stub[Row]val query="SELECT name FROM table"val resultSetFuture: ResultSetFuture = stub[ResultSetFuture]
(dbSession.executeAsync(_: String)).when(query).returns(resultSetFuture)where execute async is defined as followingval resultSetFuture: Future[ResultSet] = session.executeAsync(builtStatement).asScala
resultSetFuture.map(result => {
result.isExhausted match {
case true => Some(List())
case false => Some(result.all().asScala.map(row => transformer.buildResult(row)).toList)
}
})
--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.