LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
Public Member Functions | |
def | __init__ (self, conn) |
def | __del__ (self) |
def | lookup (self, lookupProperties, reference, dataId, **kwargs) |
def | executeQuery (self, returnFields, joinClause, whereFields, range, values) |
Static Public Member Functions | |
def | create (location) |
Public Attributes | |
conn | |
Static Public Attributes | |
string | placeHolder = "?" |
A base class for SQL-based registries Subclasses should define the class variable `placeHolder` (the particular placeholder to use for parameter substitution) appropriately. The database's python module should define `paramstyle` (see PEP 249), which would indicate what to use for a placeholder: * paramstyle = "qmark" --> placeHolder = "?" * paramstyle = "format" --> placeHolder = "%s" Other `paramstyle` values are not currently supported. Constructor parameters ---------------------- conn : DBAPI connection object Connection object
Definition at line 286 of file registries.py.
def lsst.daf.persistence.registries.SqlRegistry.__init__ | ( | self, | |
conn | |||
) |
Constructor. Parameters ---------- conn : DBAPI connection object Connection object
Reimplemented in lsst.daf.persistence.registries.PgsqlRegistry, and lsst.daf.persistence.registries.SqliteRegistry.
Definition at line 304 of file registries.py.
def lsst.daf.persistence.registries.SqlRegistry.__del__ | ( | self | ) |
Reimplemented from lsst.daf.persistence.registries.Registry.
Definition at line 315 of file registries.py.
|
staticinherited |
Create a registry object of an appropriate type. @param location (string) Path or URL for registry, or None if unavailable
Definition at line 71 of file registries.py.
def lsst.daf.persistence.registries.SqlRegistry.executeQuery | ( | self, | |
returnFields, | |||
joinClause, | |||
whereFields, | |||
range, | |||
values | |||
) |
Extract metadata from the registry. @param returnFields (list of strings) Metadata fields to be extracted. @param joinClause (list of strings) Tables in which metadata fields are located. @param whereFields (list of tuples) First tuple element is metadata field to query; second is the value that field must have (often '?'). @param range (tuple) Value, lower limit, and upper limit for a range condition on the metadata. Any of these can be metadata fields. @param values (tuple) Tuple of values to be substituted for '?' characters in the whereFields values or the range values. @return (list of tuples) All sets of field values that meet the criteria
Definition at line 401 of file registries.py.
def lsst.daf.persistence.registries.SqlRegistry.lookup | ( | self, | |
lookupProperties, | |||
reference, | |||
dataId, | |||
** | kwargs | ||
) |
Perform a lookup in the registry. Return values are refined by the values in dataId. Returns a list of values that match keys in lookupProperties. e.g. if the template is 'raw/raw_v%(visit)d_f%(filter)s.fits.gz', and dataId={'visit':1}, and lookupProperties is ['filter'], and the filesystem under self.root has exactly one file 'raw/raw_v1_fg.fits.gz' then the return value will be [('g',)] :param lookupProperties: :param dataId: must be a key/value iterable. Keys must be string. If value is a string then will look for elements in the repository that match value for value. If value is a 2-item iterable then will look for elements in the repository where the value is between the values of value[0] and value[1]. :param reference: other data types that may be used to search for values. :param **kwargs: nothing needed for sqlite lookup :return: a list of values that match keys in lookupProperties.
Definition at line 370 of file registries.py.
lsst.daf.persistence.registries.SqlRegistry.conn |
Definition at line 313 of file registries.py.
|
static |
Definition at line 302 of file registries.py.