db

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

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(dbName string)

Types

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}
var (
	Instance Postgres
)

func (*Postgres) JsonString

func (p *Postgres) JsonString(w http.ResponseWriter, query *string, args ...any) (string, error)

Returns JSON string serialized by postgres

func (*Postgres) PgxPoolClose

func (p *Postgres) PgxPoolClose()

func (*Postgres) Query

func (p *Postgres) Query(query *string, args ...any) (pgx.Rows, error)

func (*Postgres) QueryRow

func (p *Postgres) QueryRow(query *string, args ...any) pgx.Row

func (*Postgres) WriteJsonString

func (p *Postgres) WriteJsonString(w http.ResponseWriter, query *string, args ...any)

Writes JSON string serialized by postgres to provided http.ResponseWriter

Jump to

Keyboard shortcuts

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