postgres

package
v0.0.0-...-d904837 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	*sql.DB
	// contains filtered or unexported fields
}

func New

func New(db *sql.DB) *Postgres

New create postgres based database with all stores.

func (*Postgres) Migrator

func (pg *Postgres) Migrator() store.Migrator

func (*Postgres) Tx

func (pg *Postgres) Tx(ctx context.Context, txFunc store.TxFunc) (err error)

Tx run code in database transaction. Based on: https://stackoverflow.com/a/23502629.

func (*Postgres) User

func (pg *Postgres) User() store.User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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