jerry0597 / mybatisnet

Automatically exported from code.google.com/p/mybatisnet
0 stars 0 forks source link

Huge results - want to iterate myself. #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the MyBatis.NET are you using? 1.6.2

Please describe the problem.  Unit tests are best!
Am generating some potentially very complex sql (this bit works fine), and need 
to download results which can be 10s of millions of rows. I don't want to load 
it into memory so really want to handle a yielded IDataReader which I can 
iterate row-by-row (without MyBatis trying to load the whole thing into 
memory). Is this possible? Couldn't find any documentation on solving this kind 
of problem with MyBatis. Are too many variations on rules to warrant my 
creating of hundreds of queries and bcp'ing.
Also, as resultant columns in query may vary depending on the customer database 
(I know - what were they thinking), makes my wanting to deal with the 
IDataReader directly more appealing.

What is the expected output? What do you see instead?
OutOfMemoryException.

Please provide any additional information below.

Original issue reported on code.google.com by richard....@gmail.com on 1 May 2012 at 5:01

GoogleCodeExporter commented 8 years ago
Maybe you can use IMapper.QueryForMapWithRowDelegate

Original comment by jakub.ma...@gmail.com on 22 Oct 2013 at 9:45