Skip to content

如何实现流式读取 #2019

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

Open
280780363 opened this issue Apr 29, 2025 · 3 comments
Open

如何实现流式读取 #2019

280780363 opened this issue Apr 29, 2025 · 3 comments

Comments

@280780363
Copy link

280780363 commented Apr 29, 2025

Feature 特性

如何实现流式读取,像ado.net中使用IDataReader一样的的迭代器,或者像AsEnumerable()的类似方法,不用一次将数据全部拉取到内存,用于一些大批量的数据处理,避免内存爆炸,比如这样:

for (var item in Fsql.Select<MyData>.Where(r=>r.Id>0).OrderBy(r=>r.Id).Take(100000).AsEnumerable()){
   // 单行数据业务处理
}

简要描述原因

不用一次将数据全部拉取到内存,用于一些大批量的数据处理,避免内存爆炸

使用场景

大批量数据处理

@2881099
Copy link
Collaborator

2881099 commented Apr 29, 2025

#2015

@2881099
Copy link
Collaborator

2881099 commented Apr 29, 2025

#2015

@280780363
Copy link
Author

漂亮,静待

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

No branches or pull requests

2 participants