ConnectionConfig

sealed interface ConnectionConfig(source)

Common configuration for database connections to both Vert.x SqlClient and Exposed Database, currently supporting both TCP socket and Unix domain socket connections.

Use ConnectionConfig.Socket for standard TCP/IP connections, or ConnectionConfig.UnixDomainSocketWithPeerAuthentication for Unix domain socket connections with peer authentication (experimental, primarily tested with PostgreSQL on Linux).

See also

Inheritors

Types

Link copied to clipboard
class Socket(val host: String, val port: Int? = null, val user: String, val password: String, val database: String) : ConnectionConfig

Standard TCP/IP socket connection configuration.

Link copied to clipboard
class UnixDomainSocketWithPeerAuthentication(val path: String, val role: String, val database: String) : ConnectionConfig

Unix domain socket connection configuration with peer authentication.

Properties

Link copied to clipboard
abstract val database: String

The name of the database to connect to.

Link copied to clipboard
abstract val userAndRole: String

The user and role name used for authentication.

Functions

Link copied to clipboard
suspend fun ConnectionConfig.initConnection(sqlConnection: SqlConnection, extra: CoConnectHandler?)