postgres

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier[T any](conn *PostgresExecutor) querier.Querier[T]

Types

type Executor

type Executor interface {
	QueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)
}

type PostgresConf

type PostgresConf struct {
	User          string
	Password      string
	Database      string
	Host          string
	Port          int
	AllowInsecure bool
	SSHTunnel     *sshtunnel.SshTunnel
}

type PostgresExecutor

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

func NewPostgresExecutor

func NewPostgresExecutor(ctx context.Context, conf *PostgresConf) (*PostgresExecutor, error)

func (*PostgresExecutor) Close

func (e *PostgresExecutor) Close() error

func (*PostgresExecutor) Exec

func (e *PostgresExecutor) Exec(ctx context.Context, q string) error

func (*PostgresExecutor) GetDb

func (e *PostgresExecutor) GetDb() *sqlx.DB

func (*PostgresExecutor) QueryRows

func (e *PostgresExecutor) QueryRows(ctx context.Context, sql string, args ...interface{}) (*sqlx.Rows, error)

Jump to

Keyboard shortcuts

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