postgresqldriver

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 1

README

postgresql-driver

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMigrateDownFunc added in v0.0.1

func NewMigrateDownFunc() func(sourceURL, dbURL string, log *zap.Logger, shutdowner fx.Shutdowner) error

func NewMigrateUpFunc added in v0.0.1

func NewMigrateUpFunc() func(sourceURL, dbURL string, log *zap.Logger, shutdowner fx.Shutdowner) error

Types

type Driver

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

func New

func New(ctx context.Context, url string) (*Driver, error)

func (*Driver) Close

func (c *Driver) Close()

func (*Driver) CountRows

func (c *Driver) CountRows(ctx context.Context, query string, args ...interface{}) (int, error)

func (*Driver) ExecuteQuery

func (c *Driver) ExecuteQuery(ctx context.Context, query string, args ...interface{}) error

func (*Driver) Ping

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

func (*Driver) QueryRow

func (c *Driver) QueryRow(ctx context.Context, query string, args ...interface{}) (pgx.Row, error)

func (*Driver) QueryRows

func (c *Driver) QueryRows(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error)

Jump to

Keyboard shortcuts

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