lsst.dax.apdb g864b0138d7+aa38e45daa
|
Public Member Functions | |
__init__ (self, ApdbSqlSchema schema, sqlalchemy.engine.Engine engine, bool timer=False) | |
VersionTuple | apdbReplicaImplementationVersion (cls) |
list[ReplicaChunk]|None | getReplicaChunks (self) |
None | deleteReplicaChunks (self, Iterable[int] chunks) |
ApdbTableData | getDiaObjectsChunks (self, Iterable[int] chunks) |
ApdbTableData | getDiaSourcesChunks (self, Iterable[int] chunks) |
ApdbTableData | getDiaForcedSourcesChunks (self, Iterable[int] chunks) |
![]() | |
ApdbReplica | from_config (cls, ApdbConfig config) |
ApdbReplica | from_uri (cls, ResourcePathExpression uri) |
Protected Member Functions | |
Timer | _timer (self, str name, *Mapping[str, str|int]|None tags=None) |
ApdbTableData | _get_chunks (self, Iterable[int] chunks, ApdbTables table_enum, ExtraTables chunk_table_enum) |
Protected Attributes | |
_schema | |
_engine | |
_timer_args | |
Implementation of `ApdbReplica` for SQL backend. Parameters ---------- schema : `ApdbSqlSchema` Instance of `ApdbSqlSchema` class for APDB database. engine : `sqlalchemy.engine.Engine` Engine for database access. timer : `bool`, optional If `True` then log timing information.
|
protected |
Return catalog of records for given insert identifiers, common implementation for all DIA tables.
|
protected |
Create `Timer` instance given its name.
VersionTuple lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.apdbReplicaImplementationVersion | ( | cls | ) |
Return version number for current ApdbReplica implementation. Returns ------- version : `VersionTuple` Version of the code defined in implementation class.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
None lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.deleteReplicaChunks | ( | self, | |
Iterable[int] | chunks ) |
Remove replication chunks from the database. Parameters ---------- chunks : `~collections.abc.Iterable` [`int`] Chunk identifiers to remove. Notes ----- This method causes Apdb to forget about specified chunks. If there are any auxiliary data associated with the identifiers, it is also removed from database (but data in regular tables is not removed). This method should be called after successful transfer of data from APDB to PPDB to free space used by replicas.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
ApdbTableData lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.getDiaForcedSourcesChunks | ( | self, | |
Iterable[int] | chunks ) |
Return catalog of DiaForcedSource records from given replica chunks. Parameters ---------- chunks : `~collections.abc.Iterable` [`int`] Chunk identifiers to return. Returns ------- data : `ApdbTableData` Catalog containing DiaForcedSource records. In addition to all regular columns it will contain ``apdb_replica_chunk`` column. Notes ----- This part of API may not be very stable and can change before the implementation finalizes.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
ApdbTableData lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.getDiaObjectsChunks | ( | self, | |
Iterable[int] | chunks ) |
Return catalog of DiaObject records from given replica chunks. Parameters ---------- chunks : `~collections.abc.Iterable` [`int`] Chunk identifiers to return. Returns ------- data : `ApdbTableData` Catalog containing DiaObject records. In addition to all regular columns it will contain ``apdb_replica_chunk`` column. Notes ----- This part of API may not be very stable and can change before the implementation finalizes.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
ApdbTableData lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.getDiaSourcesChunks | ( | self, | |
Iterable[int] | chunks ) |
Return catalog of DiaSource records from given replica chunks. Parameters ---------- chunks : `~collections.abc.Iterable` [`int`] Chunk identifiers to return. Returns ------- data : `ApdbTableData` Catalog containing DiaSource records. In addition to all regular columns it will contain ``apdb_replica_chunk`` column. Notes ----- This part of API may not be very stable and can change before the implementation finalizes.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.
list[ReplicaChunk] | None lsst.dax.apdb.sql.apdbSqlReplica.ApdbSqlReplica.getReplicaChunks | ( | self | ) |
Return collection of replication chunks known to the database. Returns ------- chunks : `list` [`ReplicaChunk`] or `None` List of chunks, they may be time-ordered if database supports ordering. `None` is returned if database is not configured for replication.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbReplica.