Configuration
There are two different types of configuration that can be made: clientside config, and session state. Clientside configuration is strictly related on how EdgeDB.Net operates; while session state is configuration for a particular connection with EdgeDB.
Configuring the client
Clientside configuration happens at client instansiation and cannot be mutated.
The EdgeDB.EdgeDBClientPoolConfig
is used to configurate the
EdgeDB.EdgeDBClient
instance by passing it as a parameter
to the clients constructor:
var config = new EdgeDBClientPoolConfig()
{
ConnectionTimeout = 5000u
};
var client = new EdgeDBClient(config);
let config = EdgeDBClientPoolConfig(
ConnectionTimeout = 5000u
)
let client = EdgeDBClient(config)
Property |
Type |
Description |
---|---|---|
DefaultPoolSize |
|
The default client pool size. |
Logger |
|
The logger used for logging messages from the driver. |
RetryMode |
|
The retry mode for connecting new clients. |
MaxConnectionRetries |
|
The maximum number of times to retry to connect. |
ConnectionTimeout |
|
The number of miliseconds a client will wait for a connection to be established with the server. |
MessageTimeout |
|
The max amount of miliseconds a client will wait for an expected message. |
ExplicitObjectIds |
|
Whether or not to always return object ids. |
ImplicitLimit |
|
The implicit object limit for all queries. By default there is not limit. |
SchemaNamingStrategy |
|
The default naming strategy used within the schema. |
Configuring state
All state configuration methods begin with With
and return
a new client instance with the applied changes. The client instance
returned from a state change shares the same underlying connection
pool as the client it was derived from.
See EdgeDB.EdgeDBClient.WithConfig(Config)
,
EdgeDB.EdgeDBClient.WithGlobals(IDictionary<string,object>)
,
EdgeDB.EdgeDBClient.WithModule(string)
, and
EdgeDB.EdgeDBClient.WithAliases(IDictionary<string,string>)