DataAction / AdoNetCore.AseClient

AdoNetCore.AseClient - a .NET Core DB Provider for SAP ASE
Apache License 2.0
108 stars 45 forks source link

Streaming messages from the server #115

Closed c-j-hughes closed 5 years ago

c-j-hughes commented 5 years ago

The current driver implementation loads all packets from the server prior to returning any data to the AseDataReader, or any messages to the event subscribers. The reference driver is able to handle packets from the server as they are received.

For many ordinary workloads, this kinds of behaviour isn't desirable so the early versions of this project didn't support streaming results due to the additional complexity.

However for very long running tasks, streaming messages is advantageous in being able to return information before the entire process has completed. Additionally, it avoids storing the entire result set in a MemoryStream which can be prohibitive for some large result sets.

senseibaka commented 5 years ago

Also, streaming would allow the caller to receive InfoMessage events (e.g. from print statements) as they occur.