db

package
v0.0.0-...-3be5031 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New() (*DB, error)

func (*DB) Connection

func (db *DB) Connection() *pgxpool.Pool

func (*DB) Ping

func (db *DB) Ping(ctx context.Context) error

Ping verifies a connection to the database is still alive, establishing a connection if necessary.

type ErrorLineExtract

type ErrorLineExtract struct {
	LineNum   int    // Line number starting with 1
	ColumnNum int    // Column number starting with 1
	Text      string // Text of the line without a new line character.
}

func ExtractErrorLine

func ExtractErrorLine(source string, position int) (ErrorLineExtract, error)

ExtractErrorLine takes source and character position extracts the line number, column number, and the line of text.

The first character is position 1.

Jump to

Keyboard shortcuts

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