Closed XenoAmess closed 3 months ago
Hello @XenoAmess ,
There already is that functionality. It's called Cursor
.
https://mybatis.org/mybatis-3/java-api.html#statement-execution-methods
Search references to org.apache.ibatis.cursor.Cursor
in the test cases.
e.g. https://github.com/mybatis/mybatis-3/blob/master/src/test/java/org/apache/ibatis/submitted/cursor_simple/CursorSimpleTest.java
p.s. Please use text instead of image whenever possible. Texts can be copied/searched/edited, images are not.
good, would have a try
Feature request?
now we just loop the List out of stmt (and into a List), and then handle it. but it might be memory costy, so I would like to change this part to return a Iterable or a Stream, who not do
all at beginning, but do it when needed during the stream... I hope by doing this we can let the outer layers decide if read all, or just read some then stop, or read some skip others, and has the ability to avoid a giant List when return value is really big any +1 or -1s?