I didn’t test it, but why wouldn’t it work?
new Iterator[String] {
def hasNext = resultSet.next()
def next() = resultSet.getString(1)
}.toStream
More Related Contents:
- How to define “type disjunction” (union types)?
- How to define partitioning of DataFrame?
- In Scala, what is an “early initializer”?
- Case class equality in Apache Spark
- What is the difference between Scala’s case class and class?
- What is the motivation for Scala assignment evaluating to Unit rather than the value assigned?
- Dropping a nested column from Spark DataFrame
- How to model type-safe enum types?
- Scala: List[Future] to Future[List] disregarding failed futures
- Syntax sugar: _* for treating Seq as method parameters
- Filling gaps in timeseries Spark
- How to create a TypeTag manually?
- Weird behavior trying to convert case classes to heterogeneous lists recursively with Shapeless
- Implicit keyword before a parameter in anonymous function in Scala
- Forward References – why does this code compile?
- What does a lazy val do?
- Spark: Add column to dataframe conditionally
- Explanation of fold method of spark RDD
- Why does Scala provide both multiple parameters lists and multiple parameters per list? [duplicate]
- Play: How to implement action composition
- How to clone a case class instance and change just one field in Scala?
- How to use third party libraries with Scala REPL?
- How do I pattern match arrays in Scala?
- Applying an argument list to curried function using foldLeft in Scala
- Using context bounds “negatively” to ensure type class instance is absent from scope
- Akka Kill vs. Stop vs. Poison Pill?
- Scala generic method – No ClassTag available for T
- How to sort an RDD in Scala Spark?
- Insert if not exists in Slick 3.0.0
- How to transpose an RDD in Spark