yapdbgen

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cap

type Cap struct {
	PackageID int64
	Kind      string
	Name      string
	Flags     int64
	Version   string
}

type CapsByPackageRow

type CapsByPackageRow struct {
	Kind    string
	Name    string
	Flags   int64
	Version string
}

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 DeletePackageByNameArchParams

type DeletePackageByNameArchParams struct {
	Name string
	Arch string
}

type File

type File struct {
	PackageID  int64
	Path       string
	Mode       int64
	IsDir      int64
	IsSymlink  int64
	LinkTarget string
	Sha256     string
}

type InsertCapParams

type InsertCapParams struct {
	PackageID int64
	Kind      string
	Name      string
	Flags     int64
	Version   string
}

type InsertFileParams

type InsertFileParams struct {
	PackageID  int64
	Path       string
	Mode       int64
	IsDir      int64
	IsSymlink  int64
	LinkTarget string
	Sha256     string
}

type InsertPackageParams

type InsertPackageParams struct {
	Name        string
	Epoch       string
	Version     string
	Release     string
	Arch        string
	Format      string
	InstallTime int64
	Summary     string
}

type LookupPackageByNameArchParams

type LookupPackageByNameArchParams struct {
	Name string
	Arch string
}

type Meta

type Meta struct {
	Key   string
	Value string
}

type Package

type Package struct {
	ID          int64
	Name        string
	Epoch       string
	Version     string
	Release     string
	Arch        string
	Format      string
	InstallTime int64
	Summary     string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CapsByPackage

func (q *Queries) CapsByPackage(ctx context.Context, packageID int64) ([]CapsByPackageRow, error)

Get all capabilities for a package.

func (*Queries) CountPackages

func (q *Queries) CountPackages(ctx context.Context) (int64, error)

Count total installed packages.

func (*Queries) DeletePackageByNameArch

func (q *Queries) DeletePackageByNameArch(ctx context.Context, arg DeletePackageByNameArchParams) error

Delete a package by name and arch (cascades to files and caps).

func (*Queries) FilesByPackage

func (q *Queries) FilesByPackage(ctx context.Context, packageID int64) ([]File, error)

Get all files for a package.

func (*Queries) InsertCap

func (q *Queries) InsertCap(ctx context.Context, arg InsertCapParams) error

Insert a capability record.

func (*Queries) InsertFile

func (q *Queries) InsertFile(ctx context.Context, arg InsertFileParams) error

Insert a file record for a package.

func (*Queries) InsertPackage

func (q *Queries) InsertPackage(ctx context.Context, arg InsertPackageParams) (int64, error)

Insert a new package record.

func (*Queries) IsInstalledByName

func (q *Queries) IsInstalledByName(ctx context.Context, name string) (bool, error)

Check if a package is installed by name.

func (*Queries) ListPackages

func (q *Queries) ListPackages(ctx context.Context) ([]Package, error)

List all installed packages (without files/caps).

func (*Queries) LookupPackageByNameArch

func (q *Queries) LookupPackageByNameArch(ctx context.Context, arg LookupPackageByNameArchParams) (Package, error)

Look up a package by name and arch.

func (*Queries) LookupProviders

func (q *Queries) LookupProviders(ctx context.Context, name string) ([]Package, error)

Find all packages that provide a capability.

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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