Uranium
Application Framework
|
Wrapper class to perform a search for a certain set of containers. More...
Public Member Functions | |
def | __init__ (self, registry, *ignore_case=False, **kwargs) |
Constructor. More... | |
Optional[type] | getContainerType (self) |
Get the class of the containers that this query should find, if any. More... | |
def | getResult (self) |
Retrieve the result of this query. More... | |
def | isIdOnly (self) |
Check to see if this is a very simple query that looks up a single container by ID. More... | |
def | isHashable (self) |
Check to see if any of the kwargs is a Dict, which is not hashable for query caching. More... | |
def | execute (self, candidates=None) |
Execute the actual query. More... | |
def | __hash__ (self) |
def | __eq__ (self, other) |
def | __str__ (self) |
Human-readable string representation for debugging. More... | |
Wrapper class to perform a search for a certain set of containers.
This class is primarily intended to be used internally by ContainerRegistry::findContainers. It is used to perform the actual searching for containers and cache the results.
def UM.Settings.ContainerQuery.ContainerQuery.__init__ | ( | self, | |
registry, | |||
* | ignore_case = False , |
||
** | kwargs | ||
) |
Constructor.
registry | The ContainerRegistry instance this query operates on. |
container_type | A specific container class that should be filtered for. |
ignore_case | Whether or not the query should be case sensitive. |
kwargs | A dict of key, value pairs that should be searched for. |
def UM.Settings.ContainerQuery.ContainerQuery.__str__ | ( | self | ) |
Human-readable string representation for debugging.
def UM.Settings.ContainerQuery.ContainerQuery.execute | ( | self, | |
candidates = None |
|||
) |
Execute the actual query.
This will search the container metadata of the ContainerRegistry based on the arguments provided to this class' constructor. After it is done, the result can be retrieved with getResult().
Optional[type] UM.Settings.ContainerQuery.ContainerQuery.getContainerType | ( | self | ) |
Get the class of the containers that this query should find, if any.
If the query doesn't filter on container type, None
is returned.
def UM.Settings.ContainerQuery.ContainerQuery.getResult | ( | self | ) |
Retrieve the result of this query.
def UM.Settings.ContainerQuery.ContainerQuery.isHashable | ( | self | ) |
Check to see if any of the kwargs is a Dict, which is not hashable for query caching.
def UM.Settings.ContainerQuery.ContainerQuery.isIdOnly | ( | self | ) |
Check to see if this is a very simple query that looks up a single container by ID.