Page 1 of 1

SaveToStream in TZAbstractRODataset

Posted: 02.05.2024, 01:41
by fernandobanhos
Why was the SaveToStream function defined only for the TZAbstractMemTable and not for the TZAbstractRODataset?

I'm developing an HTTP Server and I needed to transport a Stream of the result of a TZQuery or a TZReadOnlyQuery to the client, that's when I realized that the SaveToStream function belonged only to the TZMemTable

Would it be possible to move or create a SaveToStream for TZQuery and TZReadOnlyQuery?

Thanks

Re: SaveToStream in TZAbstractRODataset

Posted: 02.05.2024, 08:31
by marsupilami
Hello,
fernandobanhos wrote: 02.05.2024, 01:41 Why was the SaveToStream function defined only for the TZAbstractMemTable and not for the TZAbstractRODataset?
This is because it was meant to only save the data of TZMemTable ;) Also the stream format is more or less defined to be internal for Zeos. It can change without notice.
fernandobanhos wrote: 02.05.2024, 01:41 I'm developing an HTTP Server and I needed to transport a Stream of the result of a TZQuery or a TZReadOnlyQuery to the client, that's when I realized that the SaveToStream function belonged only to the TZMemTable
May I ask what the use case is? What kind of clients do you want to connect to? There is the Zeos Webservice based proxy server and its driver. They use SOAP over HTTP and XML in general to transport the data and build a bridge over the internet for Zeos based applications.
If they don't fit into what you are doing, maybe the functions for encoding data into XML can help you.

Best regards,

Jan