A SQLite-based registry
Definition at line 406 of file registries.py.
def lsst.daf.persistence.registries.SqliteRegistry.__init__ |
( |
|
self, |
|
|
|
location |
|
) |
| |
Constructor
Parameters
----------
location : `str`
Path to SQLite3 file
Definition at line 410 of file registries.py.
def lsst.daf.persistence.registries.Registry.create |
( |
|
location | ) |
|
|
staticinherited |
Create a registry object of an appropriate type.
@param location (string) Path or URL for registry, or None if
unavailable
Definition at line 75 of file registries.py.
def lsst.daf.persistence.registries.SqlRegistry.executeQuery |
( |
|
self, |
|
|
|
returnFields, |
|
|
|
joinClause, |
|
|
|
whereFields, |
|
|
|
range, |
|
|
|
values |
|
) |
| |
|
inherited |
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 372 of file registries.py.
def lsst.daf.persistence.registries.SqlRegistry.lookup |
( |
|
self, |
|
|
|
lookupProperties, |
|
|
|
reference, |
|
|
|
dataId, |
|
|
|
kwargs |
|
) |
| |
|
inherited |
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 an iterable. Keys must be string.
If key is a string then will look for elements in the repository that match value for key.
If key is a 2-item iterable then will look for elements in the repository where the value is between
the values of key[0] and key[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 326 of file registries.py.
lsst.daf.persistence.registries.SqlRegistry.conn |
|
inherited |
string lsst.daf.persistence.registries.SqliteRegistry.placeHolder = "?" |
|
static |
The documentation for this class was generated from the following file: