Liking cljdoc? Tell your friends :D

wagoe.platform.shell.adapters.database.postgresql.connection

PostgreSQL connection management utilities.

PostgreSQL connection management utilities.
raw docstring

build-jdbc-urlclj

(build-jdbc-url {:keys [host port name application-name statement-timeout-ms]})

Build PostgreSQL JDBC URL from configuration.

Session settings ride on the URL so every physical connection in the pool gets them (unlike SET statements, which only affect one connection):

  • ApplicationName: connection identification in pg_stat_activity
  • options: statement_timeout guard + UTC timezone
  • reWriteBatchedInserts: batches multi-row INSERTs into single statements

Args: db-config: Database configuration map with :host, :port, :name and optional :application-name, :statement-timeout-ms

Returns: String - JDBC URL with PostgreSQL-specific parameters

Build PostgreSQL JDBC URL from configuration.

Session settings ride on the URL so every physical connection in the pool
gets them (unlike SET statements, which only affect one connection):
- ApplicationName: connection identification in pg_stat_activity
- options: statement_timeout guard + UTC timezone
- reWriteBatchedInserts: batches multi-row INSERTs into single statements

Args:
  db-config: Database configuration map with :host, :port, :name and
             optional :application-name, :statement-timeout-ms

Returns:
  String - JDBC URL with PostgreSQL-specific parameters
sourceraw docstring

initialize!clj

(initialize! datasource _db-config)

Verify PostgreSQL connectivity after pool creation.

Session settings (application_name, timezone, statement_timeout) are applied per-connection via JDBC URL properties in build-jdbc-url — a SET here would only reach the single pooled connection that happens to execute it.

Args: datasource: PostgreSQL datasource db-config: Database configuration map

Returns: nil - side effects only

Verify PostgreSQL connectivity after pool creation.

Session settings (application_name, timezone, statement_timeout) are applied
per-connection via JDBC URL properties in build-jdbc-url — a SET here would
only reach the single pooled connection that happens to execute it.

Args:
  datasource: PostgreSQL datasource
  db-config: Database configuration map

Returns:
  nil - side effects only
sourceraw docstring

pool-defaultsclj

(pool-defaults)

Get PostgreSQL-optimized connection pool defaults.

Returns: Map - HikariCP pool configuration

Get PostgreSQL-optimized connection pool defaults.

Returns:
  Map - HikariCP pool configuration
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close