Public Member Functions | |
def | __init__ |
def | sql |
def | get |
Private Attributes | |
_dir | |
_cached_queries |
Manages the lifespan of NamedQuery objects, drawing from a directory hierarchy of named query documents. In practice this amounts to a memory cache of NamedQuery objects.
Definition at line 454 of file named_query.py.
def indra::util::named_query::NamedQueryManager::__init__ | ( | self, | ||
named_queries_dir | ||||
) |
Initializes a manager to look for named queries in a directory.
Definition at line 460 of file named_query.py.
def indra::util::named_query::NamedQueryManager::sql | ( | self, | ||
connection, | ||||
name, | ||||
params | ||||
) |
Definition at line 466 of file named_query.py.
def indra::util::named_query::NamedQueryManager::get | ( | self, | ||
name | ||||
) |
Returns a NamedQuery instance based on the name, either from memory cache, or by parsing from disk. The name is simply a relative path to the directory associated with the manager object. Before returning the instance, the NamedQuery object is cached in memory, so that subsequent accesses don't have to read from disk or do any parsing. This means that NamedQuery objects returned by this method are shared across all users of the manager object. NamedQuery.refresh is used to bring the NamedQuery objects in sync with the actual files on disk.
Definition at line 470 of file named_query.py.
Definition at line 463 of file named_query.py.
Definition at line 464 of file named_query.py.