class documentation

class Version: (source)

View In Hierarchy

Version includes some information regarding the state of a record.

Method __str__ Undocumented
Method client_identity Get the client identity for ephemeral records. For ephemeral records, this is the unique identity of the Oxia client that did last modify it. It will be empty for all non-ephemeral records.
Method created_timestamp The time when the record was last created (If the record gets deleted and recreated, it will have a new CreatedTimestamp value)
Method is_ephemeral Check if the record is ephemeral.
Method modifications_count Get the number of modifications to the record since it was last created. If the record gets deleted and recreated, the ModificationsCount will restart at 0.
Method modified_timestamp Get the time when the record was last modified.
Method session_id Get the session identifier for ephemeral records. For ephemeral records, this is the identifier of the session to which this record lifecycle is attached to. Non-ephemeral records will always report 0.
Method version_id Retrieve the version ID.
def __str__(self): (source)

Undocumented

def client_identity(self) -> str: (source)

Get the client identity for ephemeral records. For ephemeral records, this is the unique identity of the Oxia client that did last modify it. It will be empty for all non-ephemeral records.

Returns
strThe client identity.
def created_timestamp(self) -> datetime.datetime: (source)

The time when the record was last created (If the record gets deleted and recreated, it will have a new CreatedTimestamp value)

def is_ephemeral(self) -> bool: (source)

Check if the record is ephemeral.

Returns
boolTrue if the record is ephemeral, False otherwise.
def modifications_count(self) -> int: (source)

Get the number of modifications to the record since it was last created. If the record gets deleted and recreated, the ModificationsCount will restart at 0.

Returns
intThe number of modifications.
def modified_timestamp(self) -> datetime.datetime: (source)

Get the time when the record was last modified.

Returns
datetime.datetimeThe last modification timestamp.
def session_id(self) -> int: (source)

Get the session identifier for ephemeral records. For ephemeral records, this is the identifier of the session to which this record lifecycle is attached to. Non-ephemeral records will always report 0.

Returns
intThe session ID.
def version_id(self) -> int: (source)

Retrieve the version ID.

This method returns the version ID, which is an integer value representing the current version. It does not accept any parameters and simply outputs the version ID as an integer.

Returns
intThe version ID.