From 87fb24bba69a2de66fade02298fec97dd53fb4eb Mon Sep 17 00:00:00 2001 From: Ulimo Date: Sun, 28 Feb 2021 20:15:59 +0100 Subject: [PATCH] Update README.md --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0aaf994..6d1c1b9 100644 --- a/README.md +++ b/README.md @@ -99,12 +99,32 @@ The connection string takes the following parameters: | Password | Password for the user | Password=test; | | Ssl | Https or http protocol | Ssl=true; | -# SSL Traffic +## SSL Traffic If the SSL connection string option is left out, the ADO.Net provider tries to figure out the protocol by itself. It first tries https but if that fails it tests http. This is saved as long as the application is running. But for better first time performance if one is not using https is to set ssl=false in the connection string. +## Write Json + +The ADO.NET DbDataReader has support to write a row directly to an Utf8JsonWriter. +This can be helpful if one is setting up an OData proxy in front of Presto for instance. + +Example usage: + +``` +var writer = new Utf8JsonWriter(stream); +var prestoReader = (PrestoDataReader)reader; + +writer.WriteStartArray(); +while (prestoReader.Read()) +{ + prestoReader.ToJson(writer); +} +writer.WriteEndArray(); +writer.Flush(); +``` + # Nuget Package https://www.nuget.org/packages/Data.Presto/