StoredMemoryItemInfo¶
- class lsst.daf.butler.datastores.inMemoryDatastore.StoredMemoryItemInfo(timestamp: float, storageClass: StorageClass, parentID: UUID)¶
Bases:
StoredDatastoreItemInfo
Internal InMemoryDatastore Metadata associated with a stored DatasetRef.
Attributes Summary
ID of the parent
DatasetRef
if this entry is a concrete composite.StorageClass associated with the dataset.
Unix timestamp indicating the time the dataset was stored.
Methods Summary
file_location
(factory)Return the location of artifact.
from_record
(record)Create instance from database record.
from_records
(class_name, records)Convert collection of dictionaries to records.
to_record
(**kwargs)Convert record contents to a dictionary.
to_records
(records, **kwargs)Convert a collection of records to dictionaries.
update
(**kwargs)Create a new class with everything retained apart from the specified values.
Attributes Documentation
- parentID: UUID¶
ID of the parent
DatasetRef
if this entry is a concrete composite. Not used if the dataset being stored is not a virtual component of a composite
- storageClass: StorageClass¶
StorageClass associated with the dataset.
Methods Documentation
- file_location(factory: LocationFactory) Location ¶
Return the location of artifact.
- Parameters:
- factory
LocationFactory
Factory relevant to the datastore represented by this item.
- factory
- Returns:
- location
Location
The location of the item within this datastore.
- location
- classmethod from_record(record: Mapping[str, Any]) StoredDatastoreItemInfo ¶
Create instance from database record.
- Parameters:
- record
dict
The record associated with this item.
- record
- Returns:
- infoinstance of the relevant type.
The newly-constructed item corresponding to the record.
- classmethod from_records(class_name: str, records: Iterable[Mapping[str, Any]]) list[lsst.daf.butler.datastore.stored_file_info.StoredDatastoreItemInfo] ¶
Convert collection of dictionaries to records.
- Parameters:
- Returns:
- infos
list
[StoredDatastoreItemInfo
] Sequence of records converted to typed representation.
- infos
- Raises:
- TypeError
Raised if
class_name
is not a sub-class ofStoredDatastoreItemInfo
.
- to_record(**kwargs: Any) dict[str, Any] ¶
Convert record contents to a dictionary.
- Parameters:
- **kwargs
Additional items to add to returned record.
- classmethod to_records(records: Iterable[StoredDatastoreItemInfo], **kwargs: Any) tuple[str, collections.abc.Iterable[collections.abc.Mapping[str, Any]]] ¶
Convert a collection of records to dictionaries.