database

package
v0.0.0-...-5e3d4f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(host string, port int, user string, password string, dbname string) (*pgxpool.Pool, error)

Obtain a connection pool to a PostgreSQL database.

If a connection pool already exists it is used. Otherwise, a new pool is created.

Args:

  • host (string): Address of the RDBMS hosting the Postgres cluster.
  • port (int): Port of the desired Postgres instance.
  • user (string): User connecting to the database.
  • password (string): User's password.
  • dbname (string): The name of the database you wish to connect to.

Returns:

  • (*pgxpool.Pool, error): A connection pool if no errors were encountered. Otherwise an error.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL