PostgreSQL
PostgreSQL class provides mechanisms to interact with a PostgreSQL database. It implements Driver
, Driver.Pool
, and Driver.Transactional
interfaces, offering functionalities such as connection pooling, executing queries, fetching data, and handling transactions.
The URL scheme designator can be either postgresql://
or postgres://
. Each of the URL parts is optional.
postgresql:// postgresql://localhost postgresql://localhost:5433 postgresql://localhost/mydb postgresql://user@localhost postgresql://user:secret@localhost postgresql://localhost?dbname=mydb&user=postgres&password=postgres
Parameters
The URL of the PostgreSQL database to connect to.
The username used for authentication.
The password used for authentication.
Optional pool configuration, defaulting to Driver.Pool.Options
.