klyn.databases.sql.postgresql.PostgreSQLDriver.connect
method
public static connect(url as String,
user as String = "",
password as String = "",
properties as Map<String, String> = null,
sslContext as SSLContext = null) as PostgreSQLConnection throws Exception:
Description

Opens a PostgreSQL connection.

import klyn.databases.sql.postgresql

# cnx = PostgreSQLDriver.connect("postgresql://localhost:5432/app", "app", "secret")
Throws
  • Exception if URL parsing, TCP connection, TLS setup, or authentication fails.