postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 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 CommonRepository

type CommonRepository struct {
	Storage
}

func (*CommonRepository) Builder

func (c *CommonRepository) Builder(tx *sql.Tx) sq.StatementBuilderType

func (*CommonRepository) Ping

func (c *CommonRepository) Ping(ctx context.Context) error

func (*CommonRepository) RunInSQLTransaction

func (c *CommonRepository) RunInSQLTransaction(ctx context.Context, isolationLevel sql.IsolationLevel, fn func(tx *sql.Tx) error) error

type CommonRepositoryInterface

type CommonRepositoryInterface interface {
	Ping(ctx context.Context) error
	Builder(tx *sql.Tx) sq.StatementBuilderType
	RunInSQLTransaction(ctx context.Context, isolationLevel sql.IsolationLevel, fn func(tx *sql.Tx) error) error
}

type Storage

type Storage interface {
	DB() *sql.DB
	Ping(ctx context.Context) error
	Close() error
}

func InitializeDatabase

func InitializeDatabase(ctx context.Context, conf config.PostgresConfig) (Storage, error)

Jump to

Keyboard shortcuts

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