postgresql

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DSN added in v0.4.0

func DSN(username, password, endpoint, port, database, sslmode string) string

DSN returns the DSN URL

func IsInvalidCatalog added in v0.2.0

func IsInvalidCatalog(err error) bool

IsInvalidCatalog returns true if passed a pq error indicating that the database does not exist.

func New

func New(creds map[string][]byte, database, sslmode string) xsql.DB

New returns a new PostgreSQL database client. The default database name is an empty string. The underlying pq library will default to either using the value of PGDATABASE, or if unset, the hardcoded string 'postgres'. The sslmode defines the mode used to set up the connection for the provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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