Help us shape the future of Go! Take the 2026 Go Developer Survey

pgdb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetSubtitleRow

type GetSubtitleRow struct {
	ID          string
	SubsceneID  string
	Title       string
	Slug        string
	ImdbID      string
	Language    string
	Hi          bool
	Author      string
	Releases    json.RawMessage
	Comment     string
	Year        int32
	Filename    string
	Format      string
	ContentKey  string
	ContentHash string
	UploadedAt  sql.NullTime
	Downloads   int32
}

type InsertSubtitleParams

type InsertSubtitleParams struct {
	ID          string
	SubsceneID  string
	Title       string
	Slug        string
	ImdbID      string
	Language    string
	Hi          bool
	Author      string
	Releases    json.RawMessage
	Comment     string
	Year        int32
	Filename    string
	Format      string
	ContentKey  string
	ContentHash string
	UploadedAt  sql.NullTime
	Downloads   int32
}

type ListLanguagesRow

type ListLanguagesRow struct {
	Language string
	Count    int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetSubtitle

func (q *Queries) GetSubtitle(ctx context.Context, id string) (GetSubtitleRow, error)

func (*Queries) IncrementDownloads

func (q *Queries) IncrementDownloads(ctx context.Context, id string) error

func (*Queries) InsertSubtitle

func (q *Queries) InsertSubtitle(ctx context.Context, arg InsertSubtitleParams) (sql.Result, error)

func (*Queries) ListLanguages

func (q *Queries) ListLanguages(ctx context.Context) ([]ListLanguagesRow, error)

func (*Queries) WithTx

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

type Subtitle

type Subtitle struct {
	ID          string
	SubsceneID  string
	Title       string
	Slug        string
	ImdbID      string
	Language    string
	Hi          bool
	Author      string
	Releases    json.RawMessage
	Comment     string
	Year        int32
	Filename    string
	Format      string
	ContentKey  string
	ContentHash string
	UploadedAt  sql.NullTime
	Downloads   int32
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

Jump to

Keyboard shortcuts

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