psqltest

package module
v1.3.0 Latest Latest
Warning

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

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

README

🔬 psqltest GitHub release

GitHub go.mod Go version of a Go module GoDoc reference example

CodeFactor Go Report Card codecov

lint-test grype codeql gitleaks


Go package providing testing utilities for PostgreSQL.

Here is an article expanding on the usage of this package.

Documentation

Overview

Package psqltest is a similar package to net/http/http test This package provides utilities for testing psql services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransactionDB

func NewTransactionDB(dsn string) (*sql.DB, error)

NewTransactionDB returns a new transaction DB connection.

func NewTransactionTestingDB

func NewTransactionTestingDB(t *testing.T) *sql.DB

NewTransactionTestingDB returns a new transaction DB connection. It acts as a test helper and also takes care of closing the DB connection.

func Register

func Register(dsn string)

Register is a wrapper over txdb.Register. Used to register the txdb txDBDriver.

func RegisterWithPSQLDriver added in v1.2.0

func RegisterWithPSQLDriver(dsn, psqlDriver string)

RegisterWithPSQLDriver is a wrapper over txdb.Register.q Used to register the txdb driver with a custom psql driver.

Types

This section is empty.

Jump to

Keyboard shortcuts

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