db

package
v0.0.0-...-20afc43 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitialMigration

func InitialMigration(db *sql.DB) error

Types

type CreateArchiveParams

type CreateArchiveParams struct {
	Title         pgtype.Text
	DateAdded     pgtype.Timestamptz
	DateUpdated   pgtype.Timestamptz
	Series        pgtype.Text
	DateIssued    pgtype.Date
	FilePath      pgtype.Text
	ThumbnailPath pgtype.Text
}

type CreateTagParams

type CreateTagParams struct {
	Namespace pgtype.Text
	Value     pgtype.Text
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateArchive

func (q *Queries) CreateArchive(ctx context.Context, arg CreateArchiveParams) error

func (*Queries) CreateTag

func (q *Queries) CreateTag(ctx context.Context, arg CreateTagParams) error

func (*Queries) DeleteUnusedTags

func (q *Queries) DeleteUnusedTags(ctx context.Context) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

Jump to

Keyboard shortcuts

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