Interface IDatasourceConnection
- Namespace
- YndigoBlue.Velocity.Interfaces
- Assembly
- YndigoBlue.Velocity.dll
Defines connection parameters for database datasources.
public interface IDatasourceConnection
Remarks
Datasource connections encapsulate the information needed to connect to a database, including server location, credentials, connection pooling settings, and timeouts. Each database system has a concrete implementation (SqlServerDatasourceConnection, PostgreSqlDatasourceConnection, etc.) that provides system-specific connection string generation and default values. Advanced settings allow database-specific connection string parameters and runtime context configuration.
Properties
- CommandTimeout
Gets or sets the command execution timeout in seconds.
- ConnectTimeout
Gets or sets the connection timeout in seconds.
- Database
Gets or sets the database name or catalog to connect to.
- DatasourceType
Gets the type of database system for this connection.
- DefaultSrid
Gets or sets the default spatial reference identifier (SRID) for spatial data operations.
- Hostname
Gets or sets the database server hostname or IP address.
- MaxPoolSize
Gets or sets the maximum number of connections in the connection pool.
- MinPoolSize
Gets or sets the minimum number of connections maintained in the connection pool.
- Password
Gets or sets the database authentication password.
- Pooling
Gets or sets whether connection pooling is enabled.
- Port
Gets or sets the database server port number.
- SslCaPath
Gets or sets the path to the CA certificate file used to verify the server's certificate. Required when SslMode is VerifyCA or VerifyFull.
- SslCertificatePath
Gets or sets the path to the client certificate file for mutual TLS authentication.
- SslKeyPath
Gets or sets the path to the client private key file for mutual TLS authentication.
- SslMode
Gets or sets the SSL/TLS encryption and certificate verification mode for this connection.
- UseIntegratedSecurity
Gets or sets whether OS-level integrated authentication is used instead of a username and password.
- Username
Gets or sets the database authentication username.
Methods
- Clone(Action<IDatasourceConnection>)
Creates a copy of this connection with all property values duplicated. An optional configure action can be supplied to override specific properties on the copy.
- SetAdvancedSettings(DbConnectionStringBuilder)
Applies advanced connection string settings from a connection string builder.
- SetAdvancedSettings(string)
Parses and applies advanced connection string settings from a semicolon-separated key-value pair string.
- SetContextSettings(string)
Parses and applies runtime context settings specific to the database system.