pg

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AvcSchema = "public"
	AvcTable  = "pgr66_avc"
	AvcColumn = "pgr66_avc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AvcDurationExceededError added in v0.8.5

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

func (AvcDurationExceededError) Error added in v0.8.5

func (der AvcDurationExceededError) Error() string

func (AvcDurationExceededError) String added in v0.8.5

func (der AvcDurationExceededError) String() string

type Conn

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

func NewConn

func NewConn(connParams Dsn, logger *zap.SugaredLogger) (c *Conn)

func (*Conn) AvCheckDuration added in v0.8.5

func (c *Conn) AvCheckDuration(ctx context.Context, max float64) error

func (*Conn) AvUpdateDuration added in v0.8.5

func (c *Conn) AvUpdateDuration(ctx context.Context) error

func (*Conn) AvcCreateTable added in v0.8.5

func (c *Conn) AvcCreateTable(ctx context.Context) error

func (*Conn) Connect

func (c *Conn) Connect(ctx context.Context) (err error)

func (*Conn) DSN

func (c *Conn) DSN() (dsn string)

func (*Conn) GetRows added in v0.8.5

func (c *Conn) GetRows(ctx context.Context, query string, args ...interface{}) ([]map[string]interface{}, error)

func (*Conn) Host

func (c *Conn) Host() string

func (*Conn) IsPrimary

func (c *Conn) IsPrimary(ctx context.Context) (bool, error)

func (*Conn) IsStandby

func (c *Conn) IsStandby(ctx context.Context) (bool, error)

func (*Conn) Port

func (c *Conn) Port() string

type Dsn

type Dsn map[string]string

Jump to

Keyboard shortcuts

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