mrpostgres

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnAdapter added in v0.3.1

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

func New

func New() *ConnAdapter

func (*ConnAdapter) Begin added in v0.3.1

func (c *ConnAdapter) Begin(ctx context.Context) (pgx.Tx, error)

func (*ConnAdapter) Cli added in v0.3.1

func (c *ConnAdapter) Cli() *pgxpool.Pool

func (*ConnAdapter) Close added in v0.3.1

func (c *ConnAdapter) Close() error

func (*ConnAdapter) Connect added in v0.3.1

func (c *ConnAdapter) Connect(opt Options) error

func (*ConnAdapter) Exec added in v0.3.1

func (c *ConnAdapter) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)

func (*ConnAdapter) Ping added in v0.3.1

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

func (*ConnAdapter) Query added in v0.3.1

func (c *ConnAdapter) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)

func (*ConnAdapter) QueryRow added in v0.3.1

func (c *ConnAdapter) QueryRow(ctx context.Context, sql string, args ...any) QueryRow

func (*ConnAdapter) SqQuery added in v0.3.1

func (c *ConnAdapter) SqQuery(ctx context.Context, query squirrel.SelectBuilder) (pgx.Rows, error)

func (*ConnAdapter) SqQueryRow added in v0.3.1

func (c *ConnAdapter) SqQueryRow(ctx context.Context, query squirrel.SelectBuilder) QueryRow

func (*ConnAdapter) SqUpdate added in v0.3.1

func (c *ConnAdapter) SqUpdate(ctx context.Context, query squirrel.UpdateBuilder) error

type Options

type Options struct {
	Host         string
	Port         string
	Database     string
	Username     string
	Password     string
	MaxPoolSize  int32
	ConnAttempts int32
	ConnTimeout  time.Duration
}

type QueryRow

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

func (QueryRow) Scan

func (qr QueryRow) Scan(dest ...any) error

Jump to

Keyboard shortcuts

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