Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulimo authored Feb 28, 2021
1 parent dd40e47 commit 87fb24b
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 87fb24b

Please sign in to comment.