klyn.data.sql.SQLConfiguration.SQLConfiguration
constructor
public SQLConfiguration(
url as String,
login as String = "",
password as String = "",
dialect as SQLDialect = null,
showSQL as Boolean = false,
formatSQL as Boolean = false,
queryTimeoutSeconds as Int = 0
):
Description

Creates one SQL provider configuration.

Parameters
ParameterDescription
urlLow-level SQL connection URL.
loginDatabase login.
passwordDatabase password.
dialectExplicit SQL dialect, or null for URL-based inference.
showSQLWhether executed SQL is written to the console.
formatSQLWhether logged SQL is formatted for readability.
queryTimeoutSecondsProvider query timeout, or 0 for unlimited.
Throws
  • ValueException when the URL is missing, unsupported for dialect inference, uses ODBC without an explicit dialect, or has a negative query timeout.
Example
configuration = SQLConfiguration(
url="odbc:DSN=Reporting",
login="reporter",
password="secret",
dialect=PostgreSQLDialect()
)