Light
Dark
System

API Documentation

Namespaces

enum
EdgeDB.Capabilities
EdgeDB.Capabilities()

Represents a bitfield of capabilities used when executing queries.

enum
EdgeDB.Cardinality
EdgeDB.Cardinality()

A enum containing the cardinality specification of a command.

enum
EdgeDB.ConnectionRetryMode
EdgeDB.ConnectionRetryMode()

An enum representing the retry mode when connecting new clients.

class
EdgeDB.EdgeDBClient

Represents a client pool used to interact with EdgeDB.

Properties
  • ConnectedClients (int) – Gets the total number of clients within the client pool that are connected.

  • AvailableClients (int) – Gets the number of available (idle) clients within the client pool.

    This property can equal EdgeDB.EdgeDBClient.ConnectedClients if the client type doesn’t have restrictions on idling.

  • Config (Config) – The EdgeDB.State.Config containing session-level configuration.

  • Module (string) – The default module for this client.

  • Aliases (IReadOnlyDictionary<string, string>) – The module aliases for this client.

  • Globals (IReadOnlyDictionary<string, object>) – The globals for this client.

  • ServerConfig (IReadOnlyDictionary<string, object>) – Gets the EdgeDB server config.

    The returned dictionary can be empty if the client pool hasn’t connected any clients or the clients don’t support getting a server config.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

This constructor uses the default config and will attempt to find your EdgeDB project toml file in the current working directory. If no file is found this method will throw a System.IO.FileNotFoundException.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(EdgeDBClientPoolConfig clientPoolConfig): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

This constructor will attempt to find your EdgeDB project toml file in the current working directory. If no file is found this method will throw a System.IO.FileNotFoundException.

Arguments
  • clientPoolConfig (EdgeDBClientPoolConfig) – The config for this client pool.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(EdgeDBConnection connection): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

Arguments
  • connection (EdgeDBConnection) – The connection parameters used to create new clients.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(EdgeDBConnection connection, EdgeDBClientPoolConfig clientPoolConfig): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

Arguments
  • connection (EdgeDBConnection) – The connection parameters used to create new clients.

  • clientPoolConfig (EdgeDBClientPoolConfig) – The config for this client pool.

method
EdgeDB.EdgeDBClient.ExecuteAsync()
EdgeDB.EdgeDBClient.ExecuteAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task

Executes a given query without reading the returning result.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous execute operation.

method
EdgeDB.EdgeDBClient.QueryAsync<TResult>()
EdgeDB.EdgeDBClient.QueryAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<TResult>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.EdgeDBClient.QuerySingleAsync<TResult>()
EdgeDB.EdgeDBClient.QuerySingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.EdgeDBClient.QueryRequiredSingleAsync<TResult>()
EdgeDB.EdgeDBClient.QueryRequiredSingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.EdgeDBClient.QueryJsonAsync()
EdgeDB.EdgeDBClient.QueryJsonAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<Json>

Executes a given query and returns the result as a single json string.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

Throws

EdgeDB.ResultCardinalityMismatchException – The query returned more than 1 datapoint.

method
EdgeDB.EdgeDBClient.QueryJsonElementsAsync()
EdgeDB.EdgeDBClient.QueryJsonElementsAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<Json>>

Executes a given query and returns the result as a read-only collection of json objects.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

method
EdgeDB.EdgeDBClient.EnsureConnectedAsync()
EdgeDB.EdgeDBClient.EnsureConnectedAsync(CancellationToken token): ValueTask

Ensures that a connection is established to the EdgeDB server; and that the client pool is configured to the servers recommended pool size.

Arguments
  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A System.Threading.Tasks.ValueTask representing the asynchronous connection operation.

method
EdgeDB.EdgeDBClient.WithConfig()
EdgeDB.EdgeDBClient.WithConfig(Action<ConfigProperties> configDelegate): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Config.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one.

Arguments
  • configDelegate (Action<ConfigProperties>) – A delegate used to modify the config.

Returns

A new client with the specified config.

method
EdgeDB.EdgeDBClient.WithConfig()
EdgeDB.EdgeDBClient.WithConfig(Config config): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Config.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one.

Arguments
  • config (Config) – The config for the new client.

Returns

A new client with the specified config.

method
EdgeDB.EdgeDBClient.WithGlobals()
EdgeDB.EdgeDBClient.WithGlobals(IDictionary<string, object> globals): EdgeDBClient

Creates a new client with the specified Globals.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one. The newly created client doesn’t copy any of the parents globals, this method is settative to the EdgeDB.EdgeDBClient.Globals property.

Arguments
  • globals (IDictionary<string, object>) – The globals for the newly create client.

Returns

A new client with the specified globals.

method
EdgeDB.EdgeDBClient.WithModule()
EdgeDB.EdgeDBClient.WithModule(string module): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Module.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one.

Arguments
  • module (string) – The module for the new client.

Returns

A new client with the specified module.

method
EdgeDB.EdgeDBClient.WithAliases()
EdgeDB.EdgeDBClient.WithAliases(IDictionary<string, string> aliases): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Aliases.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one. The newly created client doesn’t copy any of the parents aliases, this method is settative to the EdgeDB.EdgeDBClient.Aliases property.

Arguments
  • aliases (IDictionary<string, string>) – The module aliases for the new client.

Returns

A new client with the specified module aliases.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

This constructor uses the default config and will attempt to find your EdgeDB project toml file in the current working directory. If no file is found this method will throw a System.IO.FileNotFoundException.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(EdgeDBClientPoolConfig clientPoolConfig): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

This constructor will attempt to find your EdgeDB project toml file in the current working directory. If no file is found this method will throw a System.IO.FileNotFoundException.

Arguments
  • clientPoolConfig (EdgeDBClientPoolConfig) – The config for this client pool.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(EdgeDBConnection connection): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

Arguments
  • connection (EdgeDBConnection) – The connection parameters used to create new clients.

method
EdgeDB.EdgeDBClient.EdgeDBClient()
EdgeDB.EdgeDBClient.EdgeDBClient(EdgeDBConnection connection, EdgeDBClientPoolConfig clientPoolConfig): EdgeDBClient

Creates a new instance of a EdgeDB client pool allowing you to execute commands.

Arguments
  • connection (EdgeDBConnection) – The connection parameters used to create new clients.

  • clientPoolConfig (EdgeDBClientPoolConfig) – The config for this client pool.

method
EdgeDB.EdgeDBClient.ExecuteAsync()
EdgeDB.EdgeDBClient.ExecuteAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task

Executes a given query without reading the returning result.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous execute operation.

method
EdgeDB.EdgeDBClient.QueryAsync<TResult>()
EdgeDB.EdgeDBClient.QueryAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<TResult>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.EdgeDBClient.QuerySingleAsync<TResult>()
EdgeDB.EdgeDBClient.QuerySingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.EdgeDBClient.QueryRequiredSingleAsync<TResult>()
EdgeDB.EdgeDBClient.QueryRequiredSingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.EdgeDBClient.QueryJsonAsync()
EdgeDB.EdgeDBClient.QueryJsonAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<Json>

Executes a given query and returns the result as a single json string.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

Throws

EdgeDB.ResultCardinalityMismatchException – The query returned more than 1 datapoint.

method
EdgeDB.EdgeDBClient.QueryJsonElementsAsync()
EdgeDB.EdgeDBClient.QueryJsonElementsAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<Json>>

Executes a given query and returns the result as a read-only collection of json objects.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

method
EdgeDB.EdgeDBClient.EnsureConnectedAsync()
EdgeDB.EdgeDBClient.EnsureConnectedAsync(CancellationToken token): ValueTask

Ensures that a connection is established to the EdgeDB server; and that the client pool is configured to the servers recommended pool size.

Arguments
  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A System.Threading.Tasks.ValueTask representing the asynchronous connection operation.

method
EdgeDB.EdgeDBClient.WithConfig()
EdgeDB.EdgeDBClient.WithConfig(Action<ConfigProperties> configDelegate): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Config.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one.

Arguments
  • configDelegate (Action<ConfigProperties>) – A delegate used to modify the config.

Returns

A new client with the specified config.

method
EdgeDB.EdgeDBClient.WithConfig()
EdgeDB.EdgeDBClient.WithConfig(Config config): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Config.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one.

Arguments
  • config (Config) – The config for the new client.

Returns

A new client with the specified config.

method
EdgeDB.EdgeDBClient.WithGlobals()
EdgeDB.EdgeDBClient.WithGlobals(IDictionary<string, object> globals): EdgeDBClient

Creates a new client with the specified Globals.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one. The newly created client doesn’t copy any of the parents globals, this method is settative to the EdgeDB.EdgeDBClient.Globals property.

Arguments
  • globals (IDictionary<string, object>) – The globals for the newly create client.

Returns

A new client with the specified globals.

method
EdgeDB.EdgeDBClient.WithModule()
EdgeDB.EdgeDBClient.WithModule(string module): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Module.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one.

Arguments
  • module (string) – The module for the new client.

Returns

A new client with the specified module.

method
EdgeDB.EdgeDBClient.WithAliases()
EdgeDB.EdgeDBClient.WithAliases(IDictionary<string, string> aliases): EdgeDBClient

Creates a new client with the specified EdgeDB.EdgeDBClient.Aliases.

The created client is a ‘sub’ client of this one, the child client shares the same client pool as this one. The newly created client doesn’t copy any of the parents aliases, this method is settative to the EdgeDB.EdgeDBClient.Aliases property.

Arguments
  • aliases (IDictionary<string, string>) – The module aliases for the new client.

Returns

A new client with the specified module aliases.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync()
EdgeDB.EdgeDBClientExtensions.TransactionAsync(this ITransactibleClient client, Func<Transaction, Task> func): Task

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • func (Func<Transaction, Task>) – The callback to pass the transaction into.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>()
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>(this ITransactibleClient client, Func<Transaction, Task<TResult>> func): Task<TResult>

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • func (Func<Transaction, Task<TResult>>) – The callback to pass the transaction into.

  • TResult – The return result of the task.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync()
EdgeDB.EdgeDBClientExtensions.TransactionAsync(this ITransactibleClient client, TransactionSettings settings, Func<Transaction, Task> func): Task

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • settings (TransactionSettings) – The transactions settings.

  • func (Func<Transaction, Task>) – The callback to pass the transaction into.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>()
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>(this ITransactibleClient client, TransactionSettings settings, Func<Transaction, Task<TResult>> func): Task<TResult>

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • settings (TransactionSettings) – The transactions settings.

  • func (Func<Transaction, Task<TResult>>) – The callback to pass the transaction into.

  • TResult – The return result of the task.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.DumpDatabaseAsync()
EdgeDB.EdgeDBClientExtensions.DumpDatabaseAsync(this EdgeDBClient pool, CancellationToken token): Task<Stream>

Dumps the current database to a stream.

Arguments
  • pool (EdgeDBClient) – The client to preform the dump with.

  • token (CancellationToken) – A token to cancel the operation with.

Returns

A stream containing the entire dumped database.

Throws
  • EdgeDB.EdgeDBErrorException – The server sent an error message during the dumping process.

  • EdgeDB.EdgeDBException – The server sent a mismatched packet.

method
EdgeDB.EdgeDBClientExtensions.RestoreDatabaseAsync()
EdgeDB.EdgeDBClientExtensions.RestoreDatabaseAsync(this EdgeDBClient pool, Stream stream, CancellationToken token): Task<string>

Restores the database based on a database dump stream.

Arguments
  • pool (EdgeDBClient) – The TCP client to preform the restore with.

  • stream (Stream) – The stream containing the database dump.

  • token (CancellationToken) – A token to cancel the operation with.

Returns

The status result of the restore.

Throws
  • EdgeDB.EdgeDBException – The server sent an invalid packet or the restore operation couldn’t proceed due to the database not being empty.

  • EdgeDB.EdgeDBErrorException – The server sent an error during the restore operation.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync()
EdgeDB.EdgeDBClientExtensions.TransactionAsync(this ITransactibleClient client, Func<Transaction, Task> func): Task

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • func (Func<Transaction, Task>) – The callback to pass the transaction into.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>()
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>(this ITransactibleClient client, Func<Transaction, Task<TResult>> func): Task<TResult>

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • func (Func<Transaction, Task<TResult>>) – The callback to pass the transaction into.

  • TResult – The return result of the task.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync()
EdgeDB.EdgeDBClientExtensions.TransactionAsync(this ITransactibleClient client, TransactionSettings settings, Func<Transaction, Task> func): Task

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • settings (TransactionSettings) – The transactions settings.

  • func (Func<Transaction, Task>) – The callback to pass the transaction into.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>()
EdgeDB.EdgeDBClientExtensions.TransactionAsync<TResult>(this ITransactibleClient client, TransactionSettings settings, Func<Transaction, Task<TResult>> func): Task<TResult>

Creates a transaction and executes a callback with the transaction object.

Arguments
  • client (ITransactibleClient) – The TCP client to preform the transaction with.

  • settings (TransactionSettings) – The transactions settings.

  • func (Func<Transaction, Task<TResult>>) – The callback to pass the transaction into.

  • TResult – The return result of the task.

Returns

A task that proxies the passed in callbacks awaiter.

method
EdgeDB.EdgeDBClientExtensions.DumpDatabaseAsync()
EdgeDB.EdgeDBClientExtensions.DumpDatabaseAsync(this EdgeDBClient pool, CancellationToken token): Task<Stream>

Dumps the current database to a stream.

Arguments
  • pool (EdgeDBClient) – The client to preform the dump with.

  • token (CancellationToken) – A token to cancel the operation with.

Returns

A stream containing the entire dumped database.

Throws
  • EdgeDB.EdgeDBErrorException – The server sent an error message during the dumping process.

  • EdgeDB.EdgeDBException – The server sent a mismatched packet.

method
EdgeDB.EdgeDBClientExtensions.RestoreDatabaseAsync()
EdgeDB.EdgeDBClientExtensions.RestoreDatabaseAsync(this EdgeDBClient pool, Stream stream, CancellationToken token): Task<string>

Restores the database based on a database dump stream.

Arguments
  • pool (EdgeDBClient) – The TCP client to preform the restore with.

  • stream (Stream) – The stream containing the database dump.

  • token (CancellationToken) – A token to cancel the operation with.

Returns

The status result of the restore.

Throws
  • EdgeDB.EdgeDBException – The server sent an invalid packet or the restore operation couldn’t proceed due to the database not being empty.

  • EdgeDB.EdgeDBErrorException – The server sent an error during the restore operation.

class
EdgeDB.EdgeDBClientPoolConfig

Represents a config for a EdgeDB.EdgeDBClient, extending EdgeDB.EdgeDBConfig.

Properties
  • DefaultPoolSize (int) – Gets or sets the default client pool size.

class
EdgeDB.EdgeDBConfig

Represents the configuration options for a EdgeDB.EdgeDBClient or T:EdgeDB.EdgeDBTcpClient

Properties
  • Logger (ILogger) – Gets or sets the logger used for logging messages from the driver.

  • RetryMode (ConnectionRetryMode) – Gets or sets the retry mode for connecting new clients.

  • MaxConnectionRetries (uint) – Gets or sets the maximum number of times to retry to connect.

  • ConnectionTimeout (uint) – Gets or sets the number of miliseconds a client will wait for a connection to be established with the server.

  • MessageTimeout (uint) – Gets or sets the max amount of miliseconds a client will wait for an expected message.

  • ExplicitObjectIds (bool) – Gets or sets whether or not to always return object ids.

    If set to true returned objects will not have an implicit id property i.e. query shapes will have to explicitly list id properties.

  • ImplicitLimit (ulong) – Gets or sets the implicit object limit for all queries. By default there is not limit.

  • SchemaNamingStrategy (INamingStrategy) – Gets or sets the default naming strategy used within the schema.

    By default, the naming convention will not modify property names.

class
EdgeDB.EdgeDBConnection

Represents a class containing information on how to connect to a edgedb instance.

Properties
  • Username (string) – Gets or sets the username used to connect to the database.

    This property defaults to edgedb

  • Password (string) – Gets or sets the password to connect to the database.

  • Hostname (string) – Gets or sets the hostname of the edgedb instance to connect to.

    This property defaults to 127.0.0.1.

  • Port (int) – Gets or sets the port of the edgedb instance to connect to.

    This property defaults to 5656

  • Database (string) – Gets or sets the database name to use when connecting.

    This property defaults to edgedb

  • TLSCertData (string) – Gets or sets the TLS certificate data used to very the certificate when authenticating.

    This value is a legacy value pre 1.0 and should not be set explicity, use EdgeDB.EdgeDBConnection.TLSCertificateAuthority instead.

  • TLSCertificateAuthority (string) – Gets or sets the TLS Certificate Authority.

  • TLSSecurity (TLSSecurityMode) – Gets or sets the TLS security level.

    The default value is EdgeDB.TLSSecurityMode.Strict.

method
EdgeDB.EdgeDBConnection.FromDSN()
EdgeDB.EdgeDBConnection.FromDSN(string dsn): EdgeDBConnection

Creates an EdgeDB.EdgeDBConnection from a valid DSN.

Arguments
  • dsn (string) – The DSN to create the connection from.

Returns

A EdgeDB.EdgeDBConnection representing the DSN.

Throws
  • System.ArgumentException – A query parameter has already been defined in the DSN.

  • System.FormatException – Port was not in the correct format of int.

  • System.IO.FileNotFoundException – A file parameter wasn’t found.

  • System.Collections.Generic.KeyNotFoundException – An environment variable couldn’t be found.

method
EdgeDB.EdgeDBConnection.FromProjectFile()
EdgeDB.EdgeDBConnection.FromProjectFile(string path): EdgeDBConnection

Creates a new EdgeDBConnection from a .toml project file.

Arguments
  • path (string) – The path to the .toml project file.

Returns

A EdgeDB.EdgeDBConnection representing the project defined in the .toml file.

Throws
  • System.IO.FileNotFoundException – The supplied file path, credentials path, or instance-name file doesn’t exist.

  • System.IO.DirectoryNotFoundException – The project directory doesn’t exist for the supplied toml file.

method
EdgeDB.EdgeDBConnection.FromInstanceName()
EdgeDB.EdgeDBConnection.FromInstanceName(string name): EdgeDBConnection

Creates a new EdgeDB.EdgeDBConnection from an instance name.

Arguments
  • name (string) – The name of the instance.

Returns

A EdgeDB.EdgeDBConnection containing connection details for the specific instance.

Throws

System.IO.FileNotFoundException – The instances config file couldn’t be found.

method
EdgeDB.EdgeDBConnection.ResolveEdgeDBTOML()
EdgeDB.EdgeDBConnection.ResolveEdgeDBTOML(): EdgeDBConnection

Resolves a connection by traversing the current working directory and its parents to find an ‘edgedb.toml’ file.

Returns
Throws

System.IO.FileNotFoundException – No ‘edgedb.toml’ file could be found.

method
EdgeDB.EdgeDBConnection.Parse()
EdgeDB.EdgeDBConnection.Parse(string instance, string dsn, Action<EdgeDBConnection> configure, bool autoResolve): EdgeDBConnection

Parses the provided arguments to build an EdgeDB.EdgeDBConnection class; Parse logic follows the Priority levels of arguments.

Arguments
  • instance (string) – The instance name to connect to.

  • dsn (string) – The DSN string to use to connect.

  • configure (Action<EdgeDBConnection>) – A configuration delegate.

  • autoResolve (bool) – Whether or not to autoresolve a connection using EdgeDB.EdgeDBConnection.ResolveEdgeDBTOML().

Returns

A EdgeDB.EdgeDBConnection class that can be used to connect to a EdgeDB instance.

Throws
  • EdgeDB.ConfigurationException – An error occured while parsing or configuring the EdgeDB.EdgeDBConnection.

  • System.IO.FileNotFoundException – A configuration file could not be found.

method
EdgeDB.EdgeDBConnection.ToString()
EdgeDB.EdgeDBConnection.ToString(): string
method
EdgeDB.EdgeDBConnection.FromDSN()
EdgeDB.EdgeDBConnection.FromDSN(string dsn): EdgeDBConnection

Creates an EdgeDB.EdgeDBConnection from a valid DSN.

Arguments
  • dsn (string) – The DSN to create the connection from.

Returns

A EdgeDB.EdgeDBConnection representing the DSN.

Throws
  • System.ArgumentException – A query parameter has already been defined in the DSN.

  • System.FormatException – Port was not in the correct format of int.

  • System.IO.FileNotFoundException – A file parameter wasn’t found.

  • System.Collections.Generic.KeyNotFoundException – An environment variable couldn’t be found.

method
EdgeDB.EdgeDBConnection.FromProjectFile()
EdgeDB.EdgeDBConnection.FromProjectFile(string path): EdgeDBConnection

Creates a new EdgeDBConnection from a .toml project file.

Arguments
  • path (string) – The path to the .toml project file.

Returns

A EdgeDB.EdgeDBConnection representing the project defined in the .toml file.

Throws
  • System.IO.FileNotFoundException – The supplied file path, credentials path, or instance-name file doesn’t exist.

  • System.IO.DirectoryNotFoundException – The project directory doesn’t exist for the supplied toml file.

method
EdgeDB.EdgeDBConnection.FromInstanceName()
EdgeDB.EdgeDBConnection.FromInstanceName(string name): EdgeDBConnection

Creates a new EdgeDB.EdgeDBConnection from an instance name.

Arguments
  • name (string) – The name of the instance.

Returns

A EdgeDB.EdgeDBConnection containing connection details for the specific instance.

Throws

System.IO.FileNotFoundException – The instances config file couldn’t be found.

method
EdgeDB.EdgeDBConnection.ResolveEdgeDBTOML()
EdgeDB.EdgeDBConnection.ResolveEdgeDBTOML(): EdgeDBConnection

Resolves a connection by traversing the current working directory and its parents to find an ‘edgedb.toml’ file.

Returns
Throws

System.IO.FileNotFoundException – No ‘edgedb.toml’ file could be found.

method
EdgeDB.EdgeDBConnection.Parse()
EdgeDB.EdgeDBConnection.Parse(string instance, string dsn, Action<EdgeDBConnection> configure, bool autoResolve): EdgeDBConnection

Parses the provided arguments to build an EdgeDB.EdgeDBConnection class; Parse logic follows the Priority levels of arguments.

Arguments
  • instance (string) – The instance name to connect to.

  • dsn (string) – The DSN string to use to connect.

  • configure (Action<EdgeDBConnection>) – A configuration delegate.

  • autoResolve (bool) – Whether or not to autoresolve a connection using EdgeDB.EdgeDBConnection.ResolveEdgeDBTOML().

Returns

A EdgeDB.EdgeDBConnection class that can be used to connect to a EdgeDB instance.

Throws
  • EdgeDB.ConfigurationException – An error occured while parsing or configuring the EdgeDB.EdgeDBConnection.

  • System.IO.FileNotFoundException – A configuration file could not be found.

method
EdgeDB.EdgeDBConnection.ToString()
EdgeDB.EdgeDBConnection.ToString(): string
class
EdgeDB.EdgeDBDeserializerAttribute

Marks the current method as the method to use to deserialize the current type.

class
EdgeDB.EdgeDBHostingExtensions

A class containing extension methods for DI.

method
EdgeDB.EdgeDBHostingExtensions.AddEdgeDB()
EdgeDB.EdgeDBHostingExtensions.AddEdgeDB(this IServiceCollection collection, EdgeDBConnection connection, Action<EdgeDBClientPoolConfig> clientConfig): IServiceCollection

Adds a EdgeDB.EdgeDBClient singleton to a Microsoft.Extensions.DependencyInjection.IServiceCollection.

Arguments
  • collection (IServiceCollection) – The source collection to add a EdgeDB.EdgeDBClient to.

  • connection (EdgeDBConnection) – An optional connection arguments for the client.

  • clientConfig (Action<EdgeDBClientPoolConfig>) – An optional configuration delegate for configuring the EdgeDB.EdgeDBClient.

Returns

The source Microsoft.Extensions.DependencyInjection.IServiceCollection with EdgeDB.EdgeDBClient added as a singleton.

method
EdgeDB.EdgeDBHostingExtensions.AddEdgeDB()
EdgeDB.EdgeDBHostingExtensions.AddEdgeDB(this IServiceCollection collection, EdgeDBConnection connection, Action<EdgeDBClientPoolConfig> clientConfig): IServiceCollection

Adds a EdgeDB.EdgeDBClient singleton to a Microsoft.Extensions.DependencyInjection.IServiceCollection.

Arguments
  • collection (IServiceCollection) – The source collection to add a EdgeDB.EdgeDBClient to.

  • connection (EdgeDBConnection) – An optional connection arguments for the client.

  • clientConfig (Action<EdgeDBClientPoolConfig>) – An optional configuration delegate for configuring the EdgeDB.EdgeDBClient.

Returns

The source Microsoft.Extensions.DependencyInjection.IServiceCollection with EdgeDB.EdgeDBClient added as a singleton.

class
EdgeDB.EdgeDBIgnoreAttribute

Marks the current target to be ignored when deserializing or building queries.

class
EdgeDB.EdgeDBPropertyAttribute

Marks the current field or property as a valid target for serializing/deserializing.

method
EdgeDB.EdgeDBPropertyAttribute.EdgeDBPropertyAttribute()
EdgeDB.EdgeDBPropertyAttribute.EdgeDBPropertyAttribute(string propertyName): EdgeDBPropertyAttribute

Marks this member to be used when serializing/deserializing.

Arguments
  • propertyName (string) – The name of the member in the edgedb schema.

method
EdgeDB.EdgeDBPropertyAttribute.EdgeDBPropertyAttribute()
EdgeDB.EdgeDBPropertyAttribute.EdgeDBPropertyAttribute(string propertyName): EdgeDBPropertyAttribute

Marks this member to be used when serializing/deserializing.

Arguments
  • propertyName (string) – The name of the member in the edgedb schema.

class
EdgeDB.EdgeDBTypeAttribute

Marks this class or struct as a valid type to use when serializing/deserializing.

method
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute()
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute(string name): EdgeDBTypeAttribute

Marks this as a valid target to use when serializing/deserializing.

Arguments
  • name (string) – The name of the type in the edgedb schema.

method
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute()
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute(): EdgeDBTypeAttribute

Marks this as a valid target to use when serializing/deserializing.

method
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute()
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute(string name): EdgeDBTypeAttribute

Marks this as a valid target to use when serializing/deserializing.

Arguments
  • name (string) – The name of the type in the edgedb schema.

method
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute()
EdgeDB.EdgeDBTypeAttribute.EdgeDBTypeAttribute(): EdgeDBTypeAttribute

Marks this as a valid target to use when serializing/deserializing.

class
EdgeDB.EdgeDBTypeConverterAttribute

Marks the current property to be deserialized/serialized with a specific EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>().

method
EdgeDB.EdgeDBTypeConverterAttribute.EdgeDBTypeConverterAttribute()
EdgeDB.EdgeDBTypeConverterAttribute.EdgeDBTypeConverterAttribute(Type converterType): EdgeDBTypeConverterAttribute

Initializes the EdgeDB.EdgeDBTypeConverterAttribute with the specified EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>().

Arguments
  • converterType (Type) – The type of the converter.

Throws

System.ArgumentException – is not a valid EdgeDB.DocGenerator.docMemberSummaryParamref. EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>()

method
EdgeDB.EdgeDBTypeConverterAttribute.EdgeDBTypeConverterAttribute()
EdgeDB.EdgeDBTypeConverterAttribute.EdgeDBTypeConverterAttribute(Type converterType): EdgeDBTypeConverterAttribute

Initializes the EdgeDB.EdgeDBTypeConverterAttribute with the specified EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>().

Arguments
  • converterType (Type) – The type of the converter.

Throws

System.ArgumentException – is not a valid EdgeDB.DocGenerator.docMemberSummaryParamref. EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>()

enum
EdgeDB.ErrorSeverity
EdgeDB.ErrorSeverity()

An enum representing the error severity of a T:EdgeDB.Binary.Packets.ErrorResponse.

struct
EdgeDB.ExecuteResult
EdgeDB.ExecuteResult()

Represents a generic execution result of a command.

Properties
  • IsSuccess (bool) –

  • Exception (Exception) –

  • ExecutedQuery (string) –

class
EdgeDB.Group<TKey, TElement>

Represents a group result returned from the GROUP expression.

Arguments
  • TKey – The type of the key used to group the elements.

  • TElement – The type of the elements.

Properties
  • Key (TKey) – Gets the key used to group the set of EdgeDB.Group`2.Elements.

  • Grouping (IReadOnlyCollection<string>) – Gets the name of the property that was grouped by.

  • Elements (IReadOnlyCollection<TElement>) – Gets a collection of elements that have the same key as EdgeDB.Group`2.Key.

method
EdgeDB.Group<TKey, TElement>.Group<TKey,TElement>()
EdgeDB.Group<TKey, TElement>.Group<TKey,TElement>(TKey key, IEnumerable<string> groupedBy, IEnumerable<TElement> elements): Group<TKey,TElement>

Constructs a new grouping.

Arguments
  • key (TKey) – The key that each element share.

  • groupedBy (IEnumerable<string>) – The property used to group the elements.

  • elements (IEnumerable<TElement>) – The collection of elements that have the specified key.

method
EdgeDB.Group<TKey, TElement>.GetEnumerator()
EdgeDB.Group<TKey, TElement>.GetEnumerator(): IEnumerator<TElement>
method
EdgeDB.Group<TKey, TElement>.Group<TKey,TElement>()
EdgeDB.Group<TKey, TElement>.Group<TKey,TElement>(TKey key, IEnumerable<string> groupedBy, IEnumerable<TElement> elements): Group<TKey,TElement>

Constructs a new grouping.

Arguments
  • key (TKey) – The key that each element share.

  • groupedBy (IEnumerable<string>) – The property used to group the elements.

  • elements (IEnumerable<TElement>) – The collection of elements that have the specified key.

method
EdgeDB.Group<TKey, TElement>.GetEnumerator()
EdgeDB.Group<TKey, TElement>.GetEnumerator(): IEnumerator<TElement>
method
EdgeDB.IEdgeDBQueryable.ExecuteAsync()
EdgeDB.IEdgeDBQueryable.ExecuteAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task

Executes a given query without reading the returning result.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous execute operation.

method
EdgeDB.IEdgeDBQueryable.QueryAsync()
EdgeDB.IEdgeDBQueryable.QueryAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<object>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryAsync<TResult>()
EdgeDB.IEdgeDBQueryable.QueryAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<TResult>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

  • TResult – The type of the return result of the query.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QuerySingleAsync()
EdgeDB.IEdgeDBQueryable.QuerySingleAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<object>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QuerySingleAsync<TResult>()
EdgeDB.IEdgeDBQueryable.QuerySingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

  • TResult – The return type of the query.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync()
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<object>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync<TResult>()
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

  • TResult – The return type of the query.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryJsonAsync()
EdgeDB.IEdgeDBQueryable.QueryJsonAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<Json>

Executes a given query and returns the result as a single json string.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

Throws

EdgeDB.ResultCardinalityMismatchException – The query returned more than 1 datapoint.

method
EdgeDB.IEdgeDBQueryable.QueryJsonElementsAsync()
EdgeDB.IEdgeDBQueryable.QueryJsonElementsAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<Json>>

Executes a given query and returns the result as a read-only collection of json objects.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

method
EdgeDB.IEdgeDBQueryable.ExecuteAsync()
EdgeDB.IEdgeDBQueryable.ExecuteAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task

Executes a given query without reading the returning result.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous execute operation.

method
EdgeDB.IEdgeDBQueryable.QueryAsync()
EdgeDB.IEdgeDBQueryable.QueryAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<object>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryAsync<TResult>()
EdgeDB.IEdgeDBQueryable.QueryAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<TResult>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

  • TResult – The type of the return result of the query.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QuerySingleAsync()
EdgeDB.IEdgeDBQueryable.QuerySingleAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<object>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QuerySingleAsync<TResult>()
EdgeDB.IEdgeDBQueryable.QuerySingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

  • TResult – The return type of the query.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync()
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<object>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync<TResult>()
EdgeDB.IEdgeDBQueryable.QueryRequiredSingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

  • TResult – The return type of the query.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.IEdgeDBQueryable.QueryJsonAsync()
EdgeDB.IEdgeDBQueryable.QueryJsonAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<Json>

Executes a given query and returns the result as a single json string.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

Throws

EdgeDB.ResultCardinalityMismatchException – The query returned more than 1 datapoint.

method
EdgeDB.IEdgeDBQueryable.QueryJsonElementsAsync()
EdgeDB.IEdgeDBQueryable.QueryJsonElementsAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<Json>>

Executes a given query and returns the result as a read-only collection of json objects.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Optional collection of arguments within the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The tasks result is the json result of the query.

interface
EdgeDB.IExecuteError
EdgeDB.IExecuteError()

Represents a generic execution error.

Properties
  • Message (string) – Gets the error message.

  • ErrorCode (ServerErrorCodes) – Gets the error code.

interface
EdgeDB.IExecuteResult
EdgeDB.IExecuteResult()

An interface representing a generic execution result.

Properties
  • IsSuccess (bool) – Gets whether or not the command executed successfully.

  • ExecutionError (IExecuteError) – Gets the error (if any) that the command received.

  • Exception (Exception) – Gets the exception (if any) that the command threw when executing.

  • ExecutedQuery (string) – Gets the executed query string.

interface
EdgeDB.INamingStrategy
EdgeDB.INamingStrategy()

Represents an abstract naming strategy used to convert property names within a dotnet type to a name within a schema file.

Properties
  • DefaultNamingStrategy (INamingStrategy) – Gets the default naming strategy. This strategy does not modify property names.

  • AttributeNamingStrategy (INamingStrategy) – Gets the attribute-based naming strategy.

  • CamelCaseNamingStrategy (INamingStrategy) – Gets the ‘camelCase’ naming strategy.

  • PascalNamingStrategy (INamingStrategy) – Gets the ‘PascalCase’ naming strategy.

  • SnakeCaseNamingStrategy (INamingStrategy) – Gets the ‘snake-case’ naming strategy.

    This is the default naming strategy for the EdgeDB.TypeBuilder.

method
EdgeDB.INamingStrategy.Convert()
EdgeDB.INamingStrategy.Convert(PropertyInfo property): string

Converts the EdgeDB.DocGenerator.docMemberSummaryParamref’s name to the desired naming scheme.

Arguments
  • property (PropertyInfo) – The property info of which to convert its name.

Returns

The name defined in the schema.

method
EdgeDB.INamingStrategy.Convert()
EdgeDB.INamingStrategy.Convert(string name): string

Converts the name to the desired naming scheme.

Arguments
  • name (string) – The property name of which to convert its name.

Returns

The name defined in the schema.

method
EdgeDB.INamingStrategy.Convert()
EdgeDB.INamingStrategy.Convert(PropertyInfo property): string

Converts the EdgeDB.DocGenerator.docMemberSummaryParamref’s name to the desired naming scheme.

Arguments
  • property (PropertyInfo) – The property info of which to convert its name.

Returns

The name defined in the schema.

method
EdgeDB.INamingStrategy.Convert()
EdgeDB.INamingStrategy.Convert(string name): string

Converts the name to the desired naming scheme.

Arguments
  • name (string) – The property name of which to convert its name.

Returns

The name defined in the schema.

enum
EdgeDB.IOFormat
EdgeDB.IOFormat()

An enum representing the format of a commands result.

enum
EdgeDB.Isolation
EdgeDB.Isolation()

An enum representing the transaction mode within a EdgeDB.Transaction.

interface
EdgeDB.ITransactibleClient
EdgeDB.ITransactibleClient()

Represents a client that supports transactions.

Properties
  • TransactionState (TransactionState) – Gets the transaction state of the client.

method
EdgeDB.ITransactibleClient.StartTransactionAsync()
EdgeDB.ITransactibleClient.StartTransactionAsync(Isolation isolation, bool readOnly, bool deferrable, CancellationToken token): Task

Starts a transaction.

Arguments
  • isolation (Isolation) – The isolation mode of the transaction.

  • readOnly (bool) – Whether or not the transaction is in read-only mode.

  • deferrable (bool) – Whether or not the trasaction is deferrable.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A Task that represents the asynchronous operation of starting a transaction.

method
EdgeDB.ITransactibleClient.CommitAsync()
EdgeDB.ITransactibleClient.CommitAsync(CancellationToken token): Task

Commits the transaction to the database.

Arguments
  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A Task that represents the asynchronous operation of commiting a transaction.

method
EdgeDB.ITransactibleClient.RollbackAsync()
EdgeDB.ITransactibleClient.RollbackAsync(CancellationToken token): Task

Rolls back all commands preformed within the transaction.

Arguments
  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A Task that represents the asynchronous operation of rolling back a transaction.

method
EdgeDB.ITransactibleClient.StartTransactionAsync()
EdgeDB.ITransactibleClient.StartTransactionAsync(Isolation isolation, bool readOnly, bool deferrable, CancellationToken token): Task

Starts a transaction.

Arguments
  • isolation (Isolation) – The isolation mode of the transaction.

  • readOnly (bool) – Whether or not the transaction is in read-only mode.

  • deferrable (bool) – Whether or not the trasaction is deferrable.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A Task that represents the asynchronous operation of starting a transaction.

method
EdgeDB.ITransactibleClient.CommitAsync()
EdgeDB.ITransactibleClient.CommitAsync(CancellationToken token): Task

Commits the transaction to the database.

Arguments
  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A Task that represents the asynchronous operation of commiting a transaction.

method
EdgeDB.ITransactibleClient.RollbackAsync()
EdgeDB.ITransactibleClient.RollbackAsync(CancellationToken token): Task

Rolls back all commands preformed within the transaction.

Arguments
  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A Task that represents the asynchronous operation of rolling back a transaction.

struct
EdgeDB.ObjectEnumerator
EdgeDB.ObjectEnumerator()

Represents an enumerator for creating objects.

method
EdgeDB.ObjectEnumerator.ToDynamic()
EdgeDB.ObjectEnumerator.ToDynamic(): object

Converts this EdgeDB.ObjectEnumerator to a dynamic object.

Returns

A dynamic object.

method
EdgeDB.ObjectEnumerator.Flatten()
EdgeDB.ObjectEnumerator.Flatten(): IDictionary<string,object>

Flattens this EdgeDB.ObjectEnumerator into a dictionary with keys being property names.

Returns

A System.Collections.Generic.Dictionary`2 representing the objects properties.

method
EdgeDB.ObjectEnumerator.Next()
EdgeDB.ObjectEnumerator.Next(ref String& name, ref Object& value): bool

Reads the next property within this enumerator.

Arguments
  • name (String&) – The name of the property.

  • value (Object&) – The value of the property.

Returns

if a property was read successfully; otherwise true. false

method
EdgeDB.ObjectEnumerator.ToDynamic()
EdgeDB.ObjectEnumerator.ToDynamic(): object

Converts this EdgeDB.ObjectEnumerator to a dynamic object.

Returns

A dynamic object.

method
EdgeDB.ObjectEnumerator.Flatten()
EdgeDB.ObjectEnumerator.Flatten(): IDictionary<string,object>

Flattens this EdgeDB.ObjectEnumerator into a dictionary with keys being property names.

Returns

A System.Collections.Generic.Dictionary`2 representing the objects properties.

method
EdgeDB.ObjectEnumerator.Next()
EdgeDB.ObjectEnumerator.Next(ref String& name, ref Object& value): bool

Reads the next property within this enumerator.

Arguments
  • name (String&) – The name of the property.

  • value (Object&) – The value of the property.

Returns

if a property was read successfully; otherwise true. false

class
EdgeDB.Optional

Represents an optional value.

method
EdgeDB.Optional.Create<T>()
EdgeDB.Optional.Create<T>(): Optional<T>

Creates an unspecified optional value.

Arguments
  • T – The inner type of the optional.

Returns

A EdgeDB.Optional<T>() with no value specified.

method
EdgeDB.Optional.Create<T>()
EdgeDB.Optional.Create<T>(T value): Optional<T>

Creates an optional value.

Arguments
method
EdgeDB.Optional.ToNullable<T>()
EdgeDB.Optional.ToNullable<T>(this Optional<T> val): T?

Converts the EdgeDB.Optional<T>() to a System.Nullable`1.

Arguments
  • val (Optional<T>) – The optional to convert.

  • T – The inner type of the optional.

Returns

A nullable version of the optional.

method
EdgeDB.Optional.Create<T>()
EdgeDB.Optional.Create<T>(): Optional<T>

Creates an unspecified optional value.

Arguments
  • T – The inner type of the optional.

Returns

A EdgeDB.Optional<T>() with no value specified.

method
EdgeDB.Optional.Create<T>()
EdgeDB.Optional.Create<T>(T value): Optional<T>

Creates an optional value.

Arguments
method
EdgeDB.Optional.ToNullable<T>()
EdgeDB.Optional.ToNullable<T>(this Optional<T> val): T?

Converts the EdgeDB.Optional<T>() to a System.Nullable`1.

Arguments
  • val (Optional<T>) – The optional to convert.

  • T – The inner type of the optional.

Returns

A nullable version of the optional.

struct
EdgeDB.Optional<T>
EdgeDB.Optional<T>()

Represents an optional value type.

Arguments
  • T – The type of the optional value.

Properties
  • Unspecified (Optional<T>) – Gets the unspecified value for T.

  • Value (T) – Gets the value for this parameter.

  • IsSpecified (bool) – Returns true if this value has been specified.

method
EdgeDB.Optional<T>.Optional<T>()
EdgeDB.Optional<T>.Optional<T>(T value): Optional<T>

Creates a new Parameter with the provided value.

method
EdgeDB.Optional<T>.GetValueOrDefault()
EdgeDB.Optional<T>.GetValueOrDefault(): T

Gets the value or default``{``T}.

Returns

The value or default``{``T}.

method
EdgeDB.Optional<T>.GetValueOrDefault()
EdgeDB.Optional<T>.GetValueOrDefault(T defaultValue): T

Gets the value or the provided EdgeDB.DocGenerator.docMemberSummaryParamref.

Arguments
  • defaultValue (T) – The default value of T to return if the current EdgeDB.Optional does not have a value.

Returns

The EdgeDB.Optional`1.Value; or EdgeDB.DocGenerator.docMemberSummaryParamref.

method
EdgeDB.Optional<T>.Equals()
EdgeDB.Optional<T>.Equals(object other): bool
method
EdgeDB.Optional<T>.GetHashCode()
EdgeDB.Optional<T>.GetHashCode(): int
method
EdgeDB.Optional<T>.ToString()
EdgeDB.Optional<T>.ToString(): string
method
EdgeDB.Optional<T>.Optional<T>()
EdgeDB.Optional<T>.Optional<T>(T value): Optional<T>

Creates a new Parameter with the provided value.

method
EdgeDB.Optional<T>.GetValueOrDefault()
EdgeDB.Optional<T>.GetValueOrDefault(): T

Gets the value or default``{``T}.

Returns

The value or default``{``T}.

method
EdgeDB.Optional<T>.GetValueOrDefault()
EdgeDB.Optional<T>.GetValueOrDefault(T defaultValue): T

Gets the value or the provided EdgeDB.DocGenerator.docMemberSummaryParamref.

Arguments
  • defaultValue (T) – The default value of T to return if the current EdgeDB.Optional does not have a value.

Returns

The EdgeDB.Optional`1.Value; or EdgeDB.DocGenerator.docMemberSummaryParamref.

method
EdgeDB.Optional<T>.Equals()
EdgeDB.Optional<T>.Equals(object other): bool
method
EdgeDB.Optional<T>.GetHashCode()
EdgeDB.Optional<T>.GetHashCode(): int
method
EdgeDB.Optional<T>.ToString()
EdgeDB.Optional<T>.ToString(): string
enum
EdgeDB.ServerErrorCodes
EdgeDB.ServerErrorCodes()

Represents the different error codes sent by the server defined

enum
EdgeDB.TLSSecurityMode
EdgeDB.TLSSecurityMode()

Represents the TLS security mode the client will follow.

method
EdgeDB.Transaction.ExecuteAsync()
EdgeDB.Transaction.ExecuteAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task

Executes a given query without reading the returning result.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous execute operation.

method
EdgeDB.Transaction.QueryAsync<TResult>()
EdgeDB.Transaction.QueryAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<TResult>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.Transaction.QuerySingleAsync<TResult>()
EdgeDB.Transaction.QuerySingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.Transaction.QueryRequiredSingleAsync<TResult>()
EdgeDB.Transaction.QueryRequiredSingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.Transaction.ExecuteAsync()
EdgeDB.Transaction.ExecuteAsync(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task

Executes a given query without reading the returning result.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous execute operation.

method
EdgeDB.Transaction.QueryAsync<TResult>()
EdgeDB.Transaction.QueryAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<IReadOnlyCollection<TResult>>

Executes a given query and returns the result as a collection.

Cardinality isn’t enforced nor takes effect on the return result, the client will always construct a collection out of the data.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.Transaction.QuerySingleAsync<TResult>()
EdgeDB.Transaction.QuerySingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result or null.

This method enforces EdgeDB.Cardinality.AtMostOne, if your query returns more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

method
EdgeDB.Transaction.QueryRequiredSingleAsync<TResult>()
EdgeDB.Transaction.QueryRequiredSingleAsync<TResult>(string query, IDictionary<string, object> args, Capabilities? capabilities, CancellationToken token): Task<TResult>

Executes a given query and returns a single result.

This method enforces EdgeDB.Cardinality.One, if your query returns zero or more than one result a EdgeDB.EdgeDBException will be thrown.

Arguments
  • query (string) – The query to execute.

  • args (IDictionary<string, object>) – Any arguments that are part of the query.

  • capabilities (Nullable<Capabilities>) – The allowed capabilities for the query.

  • token (CancellationToken) – A cancellation token used to cancel the asynchronous operation.

Returns

A task representing the asynchronous query operation. The result of the task is the result of the query.

enum
EdgeDB.TransactionState
EdgeDB.TransactionState()

Represents the transaction state of the client.

class
EdgeDB.TypeBuilder

Represents the class used to build types from edgedb query results.

Properties
  • SchemaNamingStrategy (INamingStrategy) – Gets or sets the naming strategy used for deserialization of edgeql property names to dotnet property names.

    All dotnet types passed to the type builder will have their properties converted to the edgeql version using this naming strategy, the naming convention of the dotnet type will be preserved.
    If the naming strategy doesn’t find a match, the EdgeDB.TypeBuilder.AttributeNamingStrategy will be used.

method
EdgeDB.TypeBuilder.AddOrUpdateTypeBuilder<TType>()
EdgeDB.TypeBuilder.AddOrUpdateTypeBuilder<TType>(Action<TType, IDictionary<string, object>> builder): void

Adds or updates a custom type builder.

Arguments
  • builder (Action<TType, IDictionary<string, object>>) – The builder for TType.

  • TType – The type of which the builder will build.

Returns

The type info for TType.

method
EdgeDB.TypeBuilder.AddOrUpdateTypeConverter<TConverter>()
EdgeDB.TypeBuilder.AddOrUpdateTypeConverter<TConverter>(): void

Adds or updates a custom EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>()

Arguments
  • TConverter – The type converter to add.

method
EdgeDB.TypeBuilder.AddOrUpdateTypeFactory<TType>()
EdgeDB.TypeBuilder.AddOrUpdateTypeFactory<TType>(TypeDeserializerFactory factory): void

Adds or updates a custom type factory.

Arguments
  • factory (TypeDeserializerFactory) – The factory for TType.

  • TType – The type of which the factory will build.

Returns

The type info for TType.

method
EdgeDB.TypeBuilder.TryRemoveTypeFactory<TType>()
EdgeDB.TypeBuilder.TryRemoveTypeFactory<TType>(ref TypeDeserializerFactory& factory): bool

Attempts to remove a type factory.

Arguments
  • TType – The type of which to remove the factory.

Returns

if the type factory was removed; otherwise true. false

method
EdgeDB.TypeBuilder.AddOrUpdateTypeBuilder<TType>()
EdgeDB.TypeBuilder.AddOrUpdateTypeBuilder<TType>(Action<TType, IDictionary<string, object>> builder): void

Adds or updates a custom type builder.

Arguments
  • builder (Action<TType, IDictionary<string, object>>) – The builder for TType.

  • TType – The type of which the builder will build.

Returns

The type info for TType.

method
EdgeDB.TypeBuilder.AddOrUpdateTypeConverter<TConverter>()
EdgeDB.TypeBuilder.AddOrUpdateTypeConverter<TConverter>(): void

Adds or updates a custom EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>()

Arguments
  • TConverter – The type converter to add.

method
EdgeDB.TypeBuilder.AddOrUpdateTypeFactory<TType>()
EdgeDB.TypeBuilder.AddOrUpdateTypeFactory<TType>(TypeDeserializerFactory factory): void

Adds or updates a custom type factory.

Arguments
  • factory (TypeDeserializerFactory) – The factory for TType.

  • TType – The type of which the factory will build.

Returns

The type info for TType.

method
EdgeDB.TypeBuilder.TryRemoveTypeFactory<TType>()
EdgeDB.TypeBuilder.TryRemoveTypeFactory<TType>(ref TypeDeserializerFactory& factory): bool

Attempts to remove a type factory.

Arguments
  • TType – The type of which to remove the factory.

Returns

if the type factory was removed; otherwise true. false

class
EdgeDB.TypeDeserializerFactory

A method that will create a object from a EdgeDB.ObjectEnumerator.

The enumerator containing the property values.

Returns

An instance of an object that represents the data read from the EdgeDB.ObjectEnumerator.

namespace
EdgeDB.Binary
EdgeDB.Binary()
namespace
EdgeDB.Binary.Packets
EdgeDB.Binary.Packets()
namespace
EdgeDB.TypeConverters
EdgeDB.TypeConverters()
class
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>

Represents a generic client-side type converter.

Arguments
  • TSource – The client-side type which the converter is responsible for converting.

  • TTarget – The database-side type which the converter is responsible for converting to.

method
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertFrom()
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertFrom(TTarget value): TSource

Converts the given TTarget to a TSource.

Arguments
  • value (TTarget) – The value to convert to a TSource.

Returns

An instance of TSource; or default.

method
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertTo()
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertTo(TSource value): TTarget

Converts the given TSource to a TTarget.

Arguments
  • value (TSource) – The value to convert to a TTarget.

Returns

An instance of TTarget; or default.

method
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.CanConvert()
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.CanConvert(Type from, Type to): bool

Checks if the type builder can convert one type to another.

Arguments
  • from (Type) – The source type.

  • to (Type) – The target type.

Returns

if the source type can be converted to the target type; otherwise true. false

method
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertFrom()
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertFrom(TTarget value): TSource

Converts the given TTarget to a TSource.

Arguments
  • value (TTarget) – The value to convert to a TSource.

Returns

An instance of TSource; or default.

method
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertTo()
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.ConvertTo(TSource value): TTarget

Converts the given TSource to a TTarget.

Arguments
  • value (TSource) – The value to convert to a TTarget.

Returns

An instance of TTarget; or default.

method
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.CanConvert()
EdgeDB.TypeConverters.EdgeDBTypeConverter<TSource, TTarget>.CanConvert(Type from, Type to): bool

Checks if the type builder can convert one type to another.

Arguments
  • from (Type) – The source type.

  • to (Type) – The target type.

Returns

if the source type can be converted to the target type; otherwise true. false

interface
EdgeDB.TypeConverters.IEdgeDBTypeConverter
EdgeDB.TypeConverters.IEdgeDBTypeConverter()

Represents a custom type converter capable of converting one type to another.

Properties
  • Source (Type) – Gets the source type of the converter.

  • Target (Type) – Gets the target type of the converter.

method
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertFrom()
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertFrom(object value): object

Converts the given target value to the source value.

Arguments
  • value (object) – The value to convert.

method
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertTo()
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertTo(object value): object

Converts the given source value to a the target value.

Arguments
  • value (object) – The value to convert.

method
EdgeDB.TypeConverters.IEdgeDBTypeConverter.CanConvert()
EdgeDB.TypeConverters.IEdgeDBTypeConverter.CanConvert(Type from, Type to): bool

Checks if the type builder can convert one type to another.

Arguments
  • from (Type) – The source type.

  • to (Type) – The target type.

Returns

if the source type can be converted to the target type; otherwise true. false

method
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertFrom()
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertFrom(object value): object

Converts the given target value to the source value.

Arguments
  • value (object) – The value to convert.

method
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertTo()
EdgeDB.TypeConverters.IEdgeDBTypeConverter.ConvertTo(object value): object

Converts the given source value to a the target value.

Arguments
  • value (object) – The value to convert.

method
EdgeDB.TypeConverters.IEdgeDBTypeConverter.CanConvert()
EdgeDB.TypeConverters.IEdgeDBTypeConverter.CanConvert(Type from, Type to): bool

Checks if the type builder can convert one type to another.

Arguments
  • from (Type) – The source type.

  • to (Type) – The target type.

Returns

if the source type can be converted to the target type; otherwise true. false

namespace
EdgeDB.State
EdgeDB.State()
class
EdgeDB.State.Config

Represents a session-level config.

Properties
  • IdleTransationTimeout (Nullable<TimeSpan>) – Gets the idle transation timeout duration.

  • QueryExecutionTimeout (Nullable<TimeSpan>) – Gets the query execution timeout duration.

  • AllowDMLInFunctions (Nullable<bool>) – Gets whether or not to allow data maniplulations in edgeql functions.

  • DDLPolicy (Nullable<DDLPolicy>) – Gets the data definition policy for this client.

  • ApplyAccessPolicies (Nullable<bool>) – Gets whether or not to apply the access policy.

  • Default (Config) – Gets the default config.

class
EdgeDB.State.ConfigProperties

Represents properties used to modify a EdgeDB.State.Config.

Properties
  • IdleTransationTimeout (Optional<TimeSpan>) – Gets or sets the idle transation timeout duration.

  • QueryExecutionTimeout (Optional<TimeSpan>) – Gets or sets the query execution timeout duration.

  • AllowDMLInFunctions (Optional<bool>) – Gets or sets whether or not to allow data maniplulations in edgeql functions.

  • DDLPolicy (Optional<DDLPolicy>) – Gets or sets the data definition policy for this client.

  • ApplyAccessPolicies (Optional<bool>) – Gets or sets whether or not to apply the access policy.

enum
EdgeDB.State.DDLPolicy