query

package
v11.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPackageNamesBySource

func GetPackageNamesBySource(dbExecutor db.Executor) (local, remote []string, err error)

GetPackageNamesBySource returns package names with and without correspondence in SyncDBS respectively.

func GetRemotePackages

func GetRemotePackages(dbExecutor db.Executor) (
	remote []db.IPackage,
	remoteNames []string)

GetRemotePackages returns packages with no correspondence in SyncDBS.

func RemoveInvalidTargets

func RemoveInvalidTargets(targets []string, mode parser.TargetMode) []string

Types

type AURWarnings

type AURWarnings struct {
	Orphans   []string
	OutOfDate []string
	Missing   []string
	Ignore    stringset.StringSet
}

func NewWarnings

func NewWarnings() *AURWarnings

func (*AURWarnings) Print

func (warnings *AURWarnings) Print()

type Builder added in v11.2.0

type Builder interface {
	Len() int
	Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string)
	Results(w io.Writer, dbExecutor db.Executor, verboseSearch SearchVerbosity) error
	GetTargets(include, exclude intrange.IntRanges, otherExclude stringset.StringSet) ([]string, error)
}

type ErrAURSearch added in v11.1.0

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

ErrAURSearch means that it was not possible to connect to the AUR.

func (ErrAURSearch) Error added in v11.1.0

func (e ErrAURSearch) Error() string

type ErrNoQuery added in v11.1.0

type ErrNoQuery struct{}

ErrNoQuery means that query was not executed.

func (ErrNoQuery) Error added in v11.1.0

func (e ErrNoQuery) Error() string

type MixedSourceQueryBuilder added in v11.2.0

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

func NewMixedSourceQueryBuilder added in v11.2.0

func NewMixedSourceQueryBuilder(
	sortBy string,
	targetMode parser.TargetMode,
	searchBy string,
	bottomUp,
	singleLineResults bool,
) *MixedSourceQueryBuilder

func (*MixedSourceQueryBuilder) Execute added in v11.2.0

func (s *MixedSourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string)

func (*MixedSourceQueryBuilder) GetTargets added in v11.2.0

func (s *MixedSourceQueryBuilder) GetTargets(include, exclude intrange.IntRanges,
	otherExclude stringset.StringSet,
) ([]string, error)

func (*MixedSourceQueryBuilder) Len added in v11.2.0

func (s *MixedSourceQueryBuilder) Len() int

func (*MixedSourceQueryBuilder) Results added in v11.2.0

func (s *MixedSourceQueryBuilder) Results(w io.Writer, dbExecutor db.Executor, verboseSearch SearchVerbosity) error

type Pkg

type Pkg = aur.Pkg

func AURInfo

func AURInfo(ctx context.Context, aurClient aur.ClientInterface, names []string, warnings *AURWarnings, splitN int) ([]*Pkg, error)

Queries the aur for information about specified packages. All packages should be queried in a single aur request except when the number of packages exceeds the number set in config.RequestSplitN. If the number does exceed config.RequestSplitN multiple aur requests will be performed concurrently.

func AURInfoPrint

func AURInfoPrint(ctx context.Context, aurClient aur.ClientInterface, names []string, splitN int) ([]*Pkg, error)

type SearchVerbosity added in v11.1.0

type SearchVerbosity int
const (
	NumberMenu SearchVerbosity = iota
	Detailed
	Minimal
)

Verbosity settings for search.

type SourceQueryBuilder added in v11.1.0

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

func NewSourceQueryBuilder added in v11.1.0

func NewSourceQueryBuilder(
	sortBy string,
	targetMode parser.TargetMode,
	searchBy string,
	bottomUp,
	singleLineResults bool,
) *SourceQueryBuilder

func (*SourceQueryBuilder) Execute added in v11.1.0

func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string)

func (*SourceQueryBuilder) GetTargets added in v11.1.0

func (s *SourceQueryBuilder) GetTargets(include, exclude intrange.IntRanges,
	otherExclude stringset.StringSet,
) ([]string, error)

func (*SourceQueryBuilder) Len added in v11.1.0

func (s *SourceQueryBuilder) Len() int

func (SourceQueryBuilder) Less added in v11.1.0

func (r SourceQueryBuilder) Less(i, j int) bool

func (*SourceQueryBuilder) Results added in v11.1.0

func (s *SourceQueryBuilder) Results(w io.Writer, dbExecutor db.Executor, verboseSearch SearchVerbosity) error

func (SourceQueryBuilder) Reverse added in v11.1.0

func (r SourceQueryBuilder) Reverse()

Jump to

Keyboard shortcuts

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