Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
flox::InputPreferences Struct Reference

Preferences associated with a registry input. More...

#include <registry.hh>

Inheritance diagram for flox::InputPreferences:
flox::RegistryInput flox::FloxFlakeInput flox::pkgdb::PkgDbInput

Public Member Functions

 InputPreferences (const InputPreferences &)=default
 
 InputPreferences (InputPreferences &&)=default
 
InputPreferencesoperator= (const InputPreferences &)=default
 
InputPreferencesoperator= (InputPreferences &&)=default
 
 InputPreferences (const std::optional< std::vector< Subtree > > &subtrees)
 
virtual void clear ()
 Reset to default state.
 
pkgdb::PkgQueryArgs & fillPkgQueryArgs (pkgdb::PkgQueryArgs &pqa) const
 Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by InputPreferences requirements.
 
void merge (const InputPreferences &overrides)
 Merges this flox::InputPreferences with another InputPreferences, overriding values in this InputPreferences with those from the other InputPreferences.
 
bool operator== (const InputPreferences &other) const
 
bool operator!= (const InputPreferences &other) const
 

Public Attributes

std::optional< std::vector< Subtree > > subtrees
 

Detailed Description

Preferences associated with a registry input.

Member Function Documentation

◆ fillPkgQueryArgs()

pkgdb::PkgQueryArgs & flox::InputPreferences::fillPkgQueryArgs ( pkgdb::PkgQueryArgs &  pqa) const

Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by InputPreferences requirements.

NOTE: This DOES NOT clear pqa before filling it. This is intended to be used after filling pqa with global preferences.

Parameters
pqaA set of query args to fill with preferences.
Returns
A reference to the modified query args.

◆ merge()

void flox::InputPreferences::merge ( const InputPreferences overrides)

Merges this flox::InputPreferences with another InputPreferences, overriding values in this InputPreferences with those from the other InputPreferences.

Parameters
overridesA flox::InputPreferences to merge and override with.

Member Data Documentation

◆ subtrees

std::optional<std::vector<Subtree> > flox::InputPreferences::subtrees

Ordered list of subtrees to be searched. Results will be grouped by subtree in the order they appear here.


The documentation for this struct was generated from the following files: