Type Method
mysql(unixDomainSocketPath:username:password:database:maxConnectionsPerEventLoop:connectionPoolTimeout:encoder:decoder:sqlLogLevel:)
Create a database configuration factory for connecting to a server through a UNIX domain socket.
static func mysql(unixDomainSocketPath: String, username: String, password: String, database: String? = nil, maxConnectionsPerEventLoop: Int = 1, connectionPoolTimeout: TimeAmount = .seconds(10), encoder: MySQLDataEncoder = .init(), decoder: MySQLDataDecoder = .init(), sqlLogLevel: Logger.Level? = .debug) throws -> DatabaseConfigurationFactory
Parameters
unixDomainSocketPathThe path to the UNIX domain socket to connect through.
usernameThe username to use for the connection.
passwordThe password (empty string for none) to use for the connection.
databaseThe default database for the connection, if any.
maxConnectionsPerEventLoopThe maximum number of database connections to add to each event loop’s pool.
connectionPoolTimeoutThe timeout for queries on the connection pool’s wait list.
encoderA
MySQLDataEncoderused to translate bound query parameters intoMySQLDatavalues.decoderA
MySQLDataDecoderused to translateMySQLDatavalues into output values inSQLRows.sqlLogLevelThe log level to use for logging serialized queries issued to databases using this configuration.
Return Value
An appropriate configuration factory.