Class DatabaseCredentials

java.lang.Object
net.blockhost.commons.database.core.DatabaseCredentials

public final class DatabaseCredentials extends Object

Immutable holder for database connection credentials and configuration.

This class encapsulates all the information needed to connect to a SQL database, including JDBC URL, driver class, credentials, timeout settings, and additional connection properties. It is dialect-independent - the specific database modules (mariadb, postgres) provide the JDBC URL and driver class.

Use the builder to create instances:

DatabaseCredentials credentials = DatabaseCredentials.builder()
    .jdbcUrl("jdbc:mariadb://localhost:3306/mydb")
    .driverClassName("org.mariadb.jdbc.Driver")
    .username("user")
    .password("pass")
    .build();
See Also: