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

A set of query parameters. More...

#include <params.hh>

Public Member Functions

void clear ()
 Reset to default state.
 
void check () const
 Check validity of fields, throwing an exception if invalid.
 
pkgdb::PkgQueryArgs & fillPkgQueryArgs (pkgdb::PkgQueryArgs &pqa) const
 Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by SearchQuery requirements.
 

Public Attributes

std::optional< std::string > name
 
std::optional< std::string > pname
 
std::optional< std::string > version
 
std::optional< std::string > semver
 
std::optional< std::string > partialMatch
 
std::optional< std::string > partialNameMatch
 

Detailed Description

A set of query parameters.

This is essentially a reorganized form of flox::pkgdb::PkgQueryArgs that is suited for JSON input.

Member Function Documentation

◆ fillPkgQueryArgs()

pkgdb::PkgQueryArgs & flox::search::SearchQuery::fillPkgQueryArgs ( pkgdb::PkgQueryArgs &  pqa) const

Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by SearchQuery 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.

Member Data Documentation

◆ name

std::optional<std::string> flox::search::SearchQuery::name

Filter results by exact name.

◆ partialMatch

std::optional<std::string> flox::search::SearchQuery::partialMatch

Filter results by partial match on pname, attrName, or description

◆ partialNameMatch

std::optional<std::string> flox::search::SearchQuery::partialNameMatch

Filter results by partial match on pname or attrName

◆ pname

std::optional<std::string> flox::search::SearchQuery::pname

Filter results by exact pname.

◆ semver

std::optional<std::string> flox::search::SearchQuery::semver

Filter results by version range.

◆ version

std::optional<std::string> flox::search::SearchQuery::version

Filter results by exact version.


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