Documentation
¶
Index ¶
- Constants
- func DBQuery(ctx context.Context, db pgxtype.Querier, query string, args ...interface{}) ([][]string, error)
- func DBQueryWithResponse(ctx context.Context, db pgxtype.Querier, query string) (string, error)
- func GetBackendPID(ctx context.Context, conn pgxtype.Querier) (int, error)
- func ObserveLocks(ctx context.Context, db pgxtype.Querier, pid int) ([][]string, error)
- func RenderTable(tableString *strings.Builder, res [][]string)
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 ¶
DBQueryWithResponse runs query with returning results.
func GetBackendPID ¶
GetBackendPID returns backend pid.
func ObserveLocks ¶
ObserveLocks selects locks details filtered by pid.
func RenderTable ¶
RenderTable renders table result in the psql style.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.