klyn.databases.sql.postgresql.PostgreSQLDriver.openConnection
method
public openConnection(url as String, properties as Map<String, String> = null) as Connection throws SQLException:
Description

Opens a PostgreSQL connection from URL and connection properties.

import klyn.databases.sql

properties = Map<String, String>()
properties["user"] = "app"
# cnx = DriverManager.driverFor("postgresql://localhost/app").openConnection("postgresql://localhost/app", properties)
Throws
  • SQLException if URL parsing, TCP connection, TLS setup, or authentication fails.