database

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

func NewPoolFromURL

func NewPoolFromURL(ctx context.Context, url string) (*Pool, error)

func (*Pool) Close

func (p *Pool) Close()

func (*Pool) CurrentDatabase

func (p *Pool) CurrentDatabase(ctx context.Context) (string, error)

func (*Pool) HasExtension

func (p *Pool) HasExtension(ctx context.Context, name string) (bool, error)

func (*Pool) HasTimescaleDB

func (p *Pool) HasTimescaleDB(ctx context.Context) (bool, error)

func (*Pool) Query

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

func (*Pool) QueryRow

func (p *Pool) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row

func (*Pool) TimescaleDBVersion

func (p *Pool) TimescaleDBVersion(ctx context.Context) (string, error)

type QueryHelper

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

func NewQueryHelper

func NewQueryHelper(pool *Pool) *QueryHelper

func (*QueryHelper) FetchAll

func (qh *QueryHelper) FetchAll(
	ctx context.Context,
	query string,
	scanFunc func(pgx.Rows) error,
	args ...any,
) error

func (*QueryHelper) FetchOne

func (qh *QueryHelper) FetchOne(
	ctx context.Context,
	query string,
	scanFunc func(pgx.Row) error,
	args ...any,
) error

Jump to

Keyboard shortcuts

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