ApdbUpdateRecord#
- class lsst.dax.apdb.ApdbUpdateRecord(*, update_time_ns: int, update_order: int)#
Bases:
ABCAbstract base class representing all types of update records saved to replica table.
Attributes Summary
Class variable defining APDB table that this update applies to, must be defined in all concrete subclasses.
Record order in the update.
Time in nanoseconds since epoch when update happened.
Class variable defining type of the update, must be defined in all concrete subclasses and be unique.
Methods Summary
from_json(update_time_ns, update_order, json_str)Return a tuple of (field name, field value) pairs for fields that identify the record to which this update applies.
Return a tuple of (field name, field value) pairs for fields that represent updates being applied by this record.
to_json()Attributes Documentation
- apdb_table: ClassVar[ApdbTables] = <dataclasses._MISSING_TYPE object>#
Class variable defining APDB table that this update applies to, must be defined in all concrete subclasses.
- update_order: int = <dataclasses._MISSING_TYPE object>#
Record order in the update.
- update_time_ns: int = <dataclasses._MISSING_TYPE object>#
Time in nanoseconds since epoch when update happened.
- update_type: ClassVar[str] = <dataclasses._MISSING_TYPE object>#
Class variable defining type of the update, must be defined in all concrete subclasses and be unique.
Methods Documentation
- classmethod from_json(update_time_ns: int, update_order: int, json_str: str) ApdbUpdateRecord#
- abstract record_id() tuple[tuple[str, int], ...]#
Return a tuple of (field name, field value) pairs for fields that identify the record to which this update applies.
Returns#
- record_id_tuple
tuple[tuple[str,int], …] Tuple of (field name, field value) pairs for fields that identify the record to which this update applies.
- record_id_tuple
- abstract record_payload() tuple[tuple[str, Any], ...]#
Return a tuple of (field name, field value) pairs for fields that represent updates being applied by this record.
Returns#
- payload_tuple
tuple[tuple[str,Any], …] Tuple of (field name, field value) pairs.
Notes#
Returned tuple contains the fields that are actually updated. Even if this class represents an update that modifies multiple fields, individual records can update a smaller set of fields.
- payload_tuple
- to_json() str#