DatastoreRegistryBridgeManager¶
- class lsst.daf.butler.registry.interfaces.DatastoreRegistryBridgeManager(*, opaque: OpaqueTableStorageManager, universe: DimensionUniverse, datasetIdColumnType: type)¶
- Bases: - VersionedExtension- An abstract base class that defines the interface between - Registryand- Datastorewhen a new- Datastoreis constructed.- Parameters:
- opaqueOpaqueTableStorageManager
- Manager object for opaque table storage in the - Registry.
- universeDimensionUniverse
- All dimensions know to the - Registry.
- datasetIdColumnTypetype
- Type for dataset ID column. 
 
- opaque
 - Notes - Datastores are passed an instance of - DatastoreRegistryBridgeManagerat construction, and should use it to obtain and keep any of the following:- a - DatastoreRegistryBridgeinstance to record in the- Registrywhat is present in the datastore (needed by all datastores that are not just forwarders);
- one or more - OpaqueTableStorageinstance if they wish to store internal records in the- Registrydatabase;
- the - DimensionUniverse, if they need it to (e.g.) construct or validate filename templates.
 - Methods Summary - Return extension version as defined by current implementation. - Return full name of the extension. - findDatastores(ref)- Retrieve datastore locations for a given dataset. - initialize(db, context, *, opaque, datasets, ...)- Construct an instance of the manager. - refresh()- Ensure all other operations on this manager are aware of any collections that may have been registered by other clients since it was initialized or last refreshed. - register(name, *[, ephemeral])- Register a new - Datastoreassociated with this- Registry.- Return digest for schema piece managed by this extension. - Methods Documentation - abstract classmethod currentVersion() VersionTuple | None¶
- Return extension version as defined by current implementation. - This method can return - Noneif an extension does not require its version to be saved or checked.- Returns:
- versionVersionTuple
- Current extension version or - None.
 
- version
 
 - classmethod extensionName() str¶
- Return full name of the extension. - This name should match the name defined in registry configuration. It is also stored in registry attributes. Default implementation returns full class name. - Returns:
- namestr
- Full extension name. 
 
- name
 
 - abstract findDatastores(ref: DatasetRef | FakeDatasetRef) Iterable[str]¶
- Retrieve datastore locations for a given dataset. 
 - abstract classmethod initialize(db: Database, context: StaticTablesContext, *, opaque: OpaqueTableStorageManager, datasets: Type[DatasetRecordStorageManager], universe: DimensionUniverse) DatastoreRegistryBridgeManager¶
- Construct an instance of the manager. - Parameters:
- dbDatabase
- Interface to the underlying database engine and namespace. 
- contextStaticTablesContext
- Context object obtained from - Database.declareStaticTables; used to declare any tables that should always be present in a layer implemented with this manager.
- opaqueOpaqueTableStorageManager
- Registry manager object for opaque (to Registry) tables, provided to allow Datastores to store their internal information inside the Registry database. 
- datasetssubclass of DatasetRecordStorageManager
- Concrete class that will be used to manage the core dataset tables in this registry; should be used only to create foreign keys to those tables. 
- universeDimensionUniverse
- All dimensions known to the registry. 
 
- db
- Returns:
- managerDatastoreRegistryBridgeManager
- An instance of a concrete - DatastoreRegistryBridgeManagersubclass.
 
- manager
 
 - abstract refresh() None¶
- Ensure all other operations on this manager are aware of any collections that may have been registered by other clients since it was initialized or last refreshed. 
 - abstract register(name: str, *, ephemeral: bool = True) DatastoreRegistryBridge¶
- Register a new - Datastoreassociated with this- Registry.- This method should be called by all - Datastoreclasses aside from those that only forward storage to other datastores.- Parameters:
- Returns:
- bridgeDatastoreRegistryBridge
- Object that provides the interface this - Datastoreshould use to communicate with the- Registry.
 
- bridge
 
 - abstract schemaDigest() str | None¶
- Return digest for schema piece managed by this extension. - Returns:
 - Notes - There is no exact definition of digest format, any string should work. The only requirement for string contents is that it has to remain stable over time if schema does not change but it should produce different string for any change in the schema. In many cases default implementation in - _defaultSchemaDigestcan be used as a reasonable choice.