postgres

package
v0.0.0-...-d0c559a Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     int
	User     string
	Password string
	DBName   string
	SSLMode  string
}

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(config Config) (*Connection, error)

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) DB

func (c *Connection) DB() *sql.DB

func (*Connection) Transaction

func (c *Connection) Transaction(fn func(*sql.Tx) error) error

Transaction executes function within a transaction

Jump to

Keyboard shortcuts

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