klyn.databases.sql.postgresql.PostgreSQLOptions.parse
method
public static parse(url as String, properties as Map<String, String> = null) as PostgreSQLOptions
Description

Parses a PostgreSQL URL without opening a network connection. URL query options override the path; explicit properties override the URL.

Parameters
ParameterDescription
urlpostgres://, postgresql://, or jdbc:postgresql:// connection URL.
propertiesOptional connection parameters.
Returns

Validated host, database, credentials and transport options.

Throws
  • SQLException for an invalid URL, port or timeout.
Example

options = PostgreSQLOptions.parse("jdbc:postgresql://localhost/app?sslmode=require")