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

Add EnumerableField<T> #68

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

jwienekamp
Copy link
Collaborator

This enables using IEnumerable<T> on input and output models. On input models there is no difference to using arrays.

On output models the rows will be returned one-by-one using yield return. Rows are loaded from SAP individually with each iteration on the enumerable. This enables very large datasets to be handled without everything to be loaded into memory all at once.

In conjunction with InvokeFunction of pooling, the generated function now has to be stored and not disposed immediately. Otherwise the tableHandle would be destroyed on SAP side and calling any interop method using this handle will throw RFC_INVALID_HANDLE.

feat: request elements from sap one-by-one using yield return when using IEnumerable
feat: when using pooling collect functions created by InvokeFunction<TOutput> and dispose manually
@campersau
Copy link
Contributor

In conjunction with InvokeFunction of pooling, the generated function now has to be stored and not disposed immediately. Otherwise the tableHandle would be destroyed on SAP side and calling any interop method using this handle will throw RFC_INVALID_HANDLE.

This would also make it possible to use #55 with pooling.

@jwienekamp jwienekamp changed the base branch from master to develop August 7, 2022 19:13
@huysentruitw huysentruitw merged commit acdef8b into huysentruitw:develop Aug 23, 2022
@huysentruitw
Copy link
Owner

Awesome addition !

campersau added a commit to campersau/SapNwRfc-1 that referenced this pull request Mar 28, 2023
…field"

This reverts commit acdef8b, reversing
changes made to e673b76.
campersau added a commit to campersau/SapNwRfc-1 that referenced this pull request Jul 11, 2023
…field"

This reverts commit acdef8b, reversing
changes made to e673b76.
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

Successfully merging this pull request may close these issues.

3 participants