postgres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMatch = errors.New("not found")

Functions

func SanityQuery

func SanityQuery(query string) (cleanQuery string)

Types

type Database

type Database struct {
	Conn        *sqlx.DB
	LoggerEntry logging.Logger
	Table       *Table
}

func Initialize

func Initialize(ctx context.Context, logger logging.Logger, cfg *config.Config) (db Database, err error)

func (*Database) Shutdown

func (db *Database) Shutdown(ctx context.Context, logger logging.Logger)

type Query

type Query struct {
	Create *sqlx.NamedStmt
	GetOne *sqlx.NamedStmt
}

type Table

type Table struct {
	Name  string
	Query *Query
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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