klyn.databases.sql.Driver.openConnection
method

    public openConnection(url as String, properties as Map<String, String> = null) as Connection throws SQLException

Description

Opens a connection using the supplied URL and properties.

Implementations should read credentials and driver-specific options from `properties`. The map may be null when no extra option is supplied.

    import klyn.databases.sql

    properties = Map<String, String>()
    properties["user"] = "app"
    connection = DriverManager.driverFor("odbc://app").openConnection("odbc://app", properties)
    connection.close()

Parameters

- url Database connection URL.
- properties Optional connection properties.

Returns

An open SQL connection.

Throws

- SQLException if URL parsing, network setup, authentication, or database negotiation fails.