Java Iterator backed by a ResultSet

后端 未结 17 746
清歌不尽
清歌不尽 2020-12-13 06:51

I\'ve got a class that implements Iterator with a ResultSet as a data member. Essentially the class looks like this:

public class A implements Iterator{
            


        
17条回答
  •  情书的邮戳
    2020-12-13 07:16

    You can use ResultSetIterator, just put your ResultSet in the constructor.

    ResultSet rs = ...    
    ResultSetIterator = new ResultSetIterator(rs); 
    

提交回复
热议问题