Skip to content

Commit 87fb24b

Browse files
authored
Update README.md
1 parent dd40e47 commit 87fb24b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,32 @@ The connection string takes the following parameters:
9999
| Password | Password for the user | Password=test; |
100100
| Ssl | Https or http protocol | Ssl=true; |
101101

102-
# SSL Traffic
102+
## SSL Traffic
103103

104104
If the SSL connection string option is left out, the ADO.Net provider tries to figure out the protocol by itself.
105105
It first tries https but if that fails it tests http. This is saved as long as the application is running.
106106
But for better first time performance if one is not using https is to set ssl=false in the connection string.
107107

108+
## Write Json
109+
110+
The ADO.NET DbDataReader has support to write a row directly to an Utf8JsonWriter.
111+
This can be helpful if one is setting up an OData proxy in front of Presto for instance.
112+
113+
Example usage:
114+
115+
```
116+
var writer = new Utf8JsonWriter(stream);
117+
var prestoReader = (PrestoDataReader)reader;
118+
119+
writer.WriteStartArray();
120+
while (prestoReader.Read())
121+
{
122+
prestoReader.ToJson(writer);
123+
}
124+
writer.WriteEndArray();
125+
writer.Flush();
126+
```
127+
108128
# Nuget Package
109129

110130
https://www.nuget.org/packages/Data.Presto/

0 commit comments

Comments
 (0)