Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge results - want to iterate myself. #44

Open
GoogleCodeExporter opened this issue Oct 24, 2015 · 1 comment
Open

Huge results - want to iterate myself. #44

GoogleCodeExporter opened this issue Oct 24, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

Maybe you can use IMapper.QueryForMapWithRowDelegate

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant