Skip to main content
Version: v1

SequenceEvent Class

Base class for SequenceDeltaEvent and SequenceMaintenanceEvent.

The properties of this object and its sub-objects represent the state of the sequence at the point in time at which the operation was applied. They will not take into any future modifications performed to the underlying sequence and merge tree.

Signature

export declare abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes>

Type Parameters

ParameterConstraintDefaultDescription
TOperationMergeTreeDeltaOperationTypesMergeTreeDeltaOperationTypes

Constructors

ConstructorDescription
(constructor)(deltaArgs, mergeTreeClient)Constructs a new instance of the SequenceEvent class

Properties

PropertyAlertsTypeDescription
clientIdstringThe client id of the client that made the change which caused the delta event
deltaArgsIMergeTreeDeltaCallbackArgs<TOperation>
deltaOperationTOperation
firstReadonly<ISequenceDeltaRange<TOperation>>The first of the modified ranges.
isEmptyDeprecatedboolean
lastReadonly<ISequenceDeltaRange<TOperation>>The last of the modified ranges.
rangesreadonly Readonly<ISequenceDeltaRange<TOperation>>[]The in-order ranges affected by this delta. These may not be continuous.

Constructor Details

(constructor)

Constructs a new instance of the SequenceEvent class

Signature

constructor(deltaArgs: IMergeTreeDeltaCallbackArgs<TOperation>, mergeTreeClient: Client);

Parameters

ParameterTypeDescription
deltaArgsIMergeTreeDeltaCallbackArgs<TOperation>
mergeTreeClientClient

Property Details

clientId

The client id of the client that made the change which caused the delta event

Signature

get clientId(): string;

Type: string

deltaArgs

Signature

readonly deltaArgs: IMergeTreeDeltaCallbackArgs<TOperation>;

Type: IMergeTreeDeltaCallbackArgs<TOperation>

deltaOperation

Signature

readonly deltaOperation: TOperation;

Type: TOperation

first

The first of the modified ranges.

Signature

get first(): Readonly<ISequenceDeltaRange<TOperation>>;

Type: Readonly<ISequenceDeltaRange<TOperation>>

isEmpty

This API is deprecated and will be removed in a future release.
  • Events no longer fire when the change they correspond to had no impact (e.g. a remote delete event for a range that had already been deleted locally). Clients can therefore assume this property is false.

Signature

readonly isEmpty: boolean;

Type: boolean

last

The last of the modified ranges.

Signature

get last(): Readonly<ISequenceDeltaRange<TOperation>>;

Type: Readonly<ISequenceDeltaRange<TOperation>>

ranges

The in-order ranges affected by this delta. These may not be continuous.

Signature

get ranges(): readonly Readonly<ISequenceDeltaRange<TOperation>>[];

Type: readonly Readonly<ISequenceDeltaRange<TOperation>>[]