Uranium
Application Framework
UM.Settings.ContainerQuery.ContainerQuery Class Reference

Public Member Functions

def __init__
 
def getContainerType (self)
 
def getResult (self)
 
def isIdOnly (self)
 
def execute
 
def __str__ (self)
 

Static Public Attributes

dictionary cache = {}
 
 OPTIONS_REGEX = re.compile("^\\[[a-zA-Z0-9-_\\+\\. ]+(\\|[a-zA-Z0-9-_\\+\\. ]+)*\\]$")
 

Detailed Description

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.

:note Instances of this class will ignore the query results when
comparing. This is done to simplify the caching code in ContainerRegistry.

Member Function Documentation

◆ __str__()

def UM.Settings.ContainerQuery.ContainerQuery.__str__ (   self)
Human-readable string representation for debugging.

◆ getContainerType()

def UM.Settings.ContainerQuery.ContainerQuery.getContainerType (   self,
  Optional,
  type 
)
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.

◆ getResult()

def UM.Settings.ContainerQuery.ContainerQuery.getResult (   self,
  Optional,
  List,
  Dict,
  str,
  Any 
)
Retrieve the result of this query.

:return: A list of containers matching this query, or None if the query was not executed.

◆ isIdOnly()

def UM.Settings.ContainerQuery.ContainerQuery.isIdOnly (   self,
  bool 
)
Check to see if this is a very simple query that looks up a single container by ID.

:return: True if this query is case sensitive, has only 1 thing to search for and that thing is "id".

The documentation for this class was generated from the following file: