ApdbUpdateRecord

class lsst.dax.apdb.ApdbUpdateRecord(*, update_time_ns: int, update_order: int)

Bases: ABC

Abstract base class representing all types of update records saved to replica table.

Methods Summary

from_json(update_time_ns, update_order, json_str)

record_id()

Return a tuple of (field name, field value) pairs for fields that identify the record to which this update applies.

record_payload()

Return a tuple of (field name, field value) pairs for fields that represent updates being applied by this record.

to_json()

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_tupletuple [tuple [str, int], …]

Tuple of (field name, field value) pairs for fields that identify the record to which this update applies.

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_tupletuple [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.

to_json() str