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

Parameter Constraint Default Description
TOperation MergeTreeDeltaOperationTypes MergeTreeDeltaOperationTypes

Constructors

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

Properties

Property Alerts Type Description
clientId string The client id of the client that made the change which caused the delta event
deltaArgs IMergeTreeDeltaCallbackArgs<TOperation>
deltaOperation TOperation
first Readonly<ISequenceDeltaRange<TOperation>> The first of the modified ranges.
isEmpty Deprecated boolean
last Readonly<ISequenceDeltaRange<TOperation>> The last of the modified ranges.
ranges readonly 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

Parameter Type Description
deltaArgs IMergeTreeDeltaCallbackArgs<TOperation>
mergeTreeClient Client

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>>[]