Package conary :: Package repository :: Module findtrove :: Class QuerySet
[hide private]
[frames] | no frames]

Class QuerySet

source code

object --+
         |
        QuerySet
Known Subclasses:
QueryByBranchSet, QueryByLabelPathSet, QueryByVersionSet

A representation of the translation from (name, versionStr, flavor) to a set of queries that can be made to the repository.

The set of queries may be ordered, as when an installLabelPath is checked, or they may be unordered as when using label affinity to search for updates to two packages at once.

The query has several components.

troveSpec: The original (n,v,f) query success: True if this query is successful results: List of results returned by this query (unordered)

Instance Methods [hide private]
 
__init__(self, troveSpec, searchKey)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
getFilter(self) source code
 
__repr__(self)
repr(x)
source code
 
markAsSuccess(self) source code
 
addSearchQueue(self, queue)
Add a set of searches to do, in order, for this QuerySet.
source code
 
nextSearchList(self)
Return the next set of queries to pass to the repository (max one per queue).
source code
 
foundResults(self, queueIdx, resultList) source code
 
noResultsFound(self, queueIdx, alternateList) source code
 
iterAlternatesByQueue(self)
Return alternates and the searches that resulted in those alternates being suggested.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]
  useFilter = False
Properties [hide private]
  _activeByQueue
  _alternatesByQueue
  _searchIdx
  _searchQueues
  results
  searchKey
  success
  troveSpec

Inherited from object: __class__

Method Details [hide private]

__init__(self, troveSpec, searchKey)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

addSearchQueue(self, queue)

source code 

Add a set of searches to do, in order, for this QuerySet.

The queue should be a list of lists to search, e.g.: [[(n,v,f), (n,v,f')], [(n,v',f), (n,v',f'')]]

Items in the first list will be searched first and a result for any of those queries will stop the queue. If no results from the first list return the second list will be searched, and so on.

nextSearchList(self)

source code 

Return the next set of queries to pass to the repository (max one per queue).

The returned result is of the form: [(queueIdx, list of queries for this idx), (queueIdx', ...)]