querier

package
v0.12.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SyntaxPQErrorCode defines the pq syntax error code.
	SyntaxPQErrorCode = "42601"

	// SystemPQErrorCodeUndefinedFile defines external errors to PostgreSQL itself.
	SystemPQErrorCodeUndefinedFile = "58P01"
)

Variables

This section is empty.

Functions

func DBQuery

func DBQuery(ctx context.Context, db pgxtype.Querier, query string, args ...interface{}) ([][]string, error)

DBQuery runs query and returns table results.

func DBQueryWithResponse

func DBQueryWithResponse(ctx context.Context, db pgxtype.Querier, query string) (string, error)

DBQueryWithResponse runs query with returning results.

func GetBackendPID

func GetBackendPID(ctx context.Context, conn pgxtype.Querier) (int, error)

GetBackendPID returns backend pid.

func ObserveLocks

func ObserveLocks(ctx context.Context, db pgxtype.Querier, pid int) ([][]string, error)

ObserveLocks selects locks details filtered by pid.

func RenderTable

func RenderTable(tableString *strings.Builder, res [][]string)

RenderTable renders table result in the psql style.

Types

This section is empty.

Jump to

Keyboard shortcuts

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