@oxia-db/client - v0.1.0
    Preparing search index...

    Class Version

    Metadata about the state of an Oxia record.

    Returned as part of every PutResult, GetResult, and record emitted by OxiaClient.rangeScan. All timestamps come from the server's clock.

    Index

    Constructors

    • Parameters

      • params: {
            versionId: number;
            modificationsCount: number;
            createdTimestamp: Date;
            modifiedTimestamp: Date;
            sessionId?: number;
            clientIdentity?: string;
        }

      Returns Version

    Properties

    versionId: number

    Monotonically increasing version identifier assigned by the server. Every write bumps this value; pass it back as expectedVersionId for optimistic concurrency.

    modificationsCount: number

    Number of modifications made since the record was (re)created. Zero on the initial put; resets to 0 if the record is deleted and recreated.

    createdTimestamp: Date

    When the current incarnation of the record was first created. If a record is deleted and recreated, this timestamp resets.

    modifiedTimestamp: Date

    When the record was last modified.

    sessionId?: number

    Session identifier for ephemeral records. undefined for non-ephemeral records.

    clientIdentity?: string

    Identity string of the client that last wrote this ephemeral record. undefined for non-ephemeral records.

    Methods

    • True if the record is tied to a client session (i.e. created with { ephemeral: true }) and will be deleted when that session ends.

      Returns boolean