driver

package
v0.0.0-...-0cd45ec Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

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

NewDatabase opens new connection to the dtabase based on dsn string

func TestDB

func TestDB(d *sql.DB) error

TestDB tries to PING the database

Types

type DB

type DB struct {
	SQL *sql.DB
}

DB holds the database connection pool

func ConnectSQL

func ConnectSQL(dsn string) (*DB, error)

ConnectSQL creates database pool for PostgreSQL database

Jump to

Keyboard shortcuts

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