Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RecordV2DeltaImpl

Implementation of RecordV2Delta

Hierarchy

Implements

Index

Constructors

constructor

  • new RecordV2DeltaImpl(buffer: Uint8Array, offset?: number, length?: number, recordChanges?: Array<boolean | number> | null, fieldChanges?: FieldChanges): RecordV2DeltaImpl
  • Create a RecordV2DeltaImpl instance

    Parameters

    • buffer: Uint8Array

      the internal buffer

    • Default value offset: number = 0

      the offset of the slice

    • Default value length: number = buffer.length

      the number of bytes in the slice

    • Optional recordChanges: Array<boolean | number> | null

      an array containing a record index at position 0 and a boolean at position 1 indicating if a record has changed

    • Optional fieldChanges: FieldChanges

      an array of arrays containing a field index at position 0 and a boolean at position 1 indicating which fields have changed

    Returns RecordV2DeltaImpl

Properties

$buffer

$buffer: Uint8Array

The internal buffer

$length

$length: number

The number of bytes in the slice

$offset

$offset: number

The offset of the slice

Private Optional Readonly fieldChanges

fieldChanges: FieldChanges

An array of arrays containing a field index at position 0 and a boolean at position 1 indicating which fields have changed

Private Optional Readonly recordChanges

recordChanges: Array<boolean | number> | null

An array containing a record index at position 0 and a boolean at position 1 indicating if a record has changed

Methods

asArray

  • asArray(): Uint8Array
  • Get a copy of the array containing this value.

    Returns Uint8Array

    This value in binary form

asBuffer

  • asBuffer(): Buffer
  • Get a copy of the buffer containing this value.

    deprecated

    since version 6.11. Buffer has been replaced by Uint8Array. This will be removed in a future release.

    Returns Buffer

    This value in binary form

changes

  • inheritdoc

    Parameters

    Returns ChangeImpl[]

copyTo

  • copyTo(target: Uint8Array, offset?: number): void
  • inheritdoc

    Parameters

    • target: Uint8Array
    • Default value offset: number = 0

    Returns void

equalBytes

  • equalBytes(buffer: Uint8Array, offset?: number, length?: number): boolean
  • Check if the Bytes are equal to a buffer slices

    Parameters

    • buffer: Uint8Array

      the buffer

    • Default value offset: number = 0

      the offset of the slice

    • Default value length: number = buffer.length

      the number of bytes in the slice

    Returns boolean

    true if the two bytes are equal

equals

  • Check if the Bytes are equal to a buffer slices

    Parameters

    Returns boolean

    true if the two bytes are equal

length

  • length(): number
  • Get the number of bytes

    Returns number

    The length of the data in bytes

Private processFixedFieldChanges

  • Process changes in a fixed multiplicity field

    Parameters

    • record: Record

      the schema definition of the record

    • recordIndex: number

      the local index of the record to process

    • field: Node

      the schema definition of the field

    • startIndex: number

      the start index of the field to process

    • data: RecordData

      the record data

    • changes: ChangeImpl[]

      the change list in which to record the changes

    Returns number

    the next field index to process

Private processFixedRecordChanges

  • Process changes in a fixed multiplicity record

    Parameters

    • schemaRecord: Record

      the schema definition of the record

    • startIndex: number

      the start index of the record to process

    • data: RecordData[]

      the record data

    • changes: ChangeImpl[]

      the change list in which to record the changes

    Returns number

    the next record index to process

Private processRecordChanges

  • processRecordChanges(dataRecordIndex: number, record: Record, recordIndex: number, data: RecordData, changes: ChangeImpl[]): void
  • Process changes in a single record entry

    Parameters

    • dataRecordIndex: number

      the global index of the record to process

    • record: Record
    • recordIndex: number

      the local index of the record to process

    • data: RecordData

      the record data

    • changes: ChangeImpl[]

      the change list in which to record the changes

    Returns void

Private processVariableFieldChanges

  • processVariableFieldChanges(record: Node, recordIndex: number, dataRecordIndex: number, field: Node, startIndex: number, data: RecordData, changes: ChangeImpl[]): number
  • Process changes in a varable multiplicity field

    Parameters

    • record: Node

      the schema definition of the record

    • recordIndex: number

      the local index of the record to process

    • dataRecordIndex: number

      the global index of the record to process

    • field: Node

      the schema definition of the field

    • startIndex: number

      the start index of the field to process

    • data: RecordData

      the record data

    • changes: ChangeImpl[]

      the change list in which to record the changes

    Returns number

    the next field index to process

Private processVariableRecordChanges

  • Process changes in a variable multiplicity record

    Parameters

    • schemaRecord: Record

      the schema definition of the record

    • startIndex: number

      the start index of the record to process

    • data: RecordData[]

      the record data

    • changes: ChangeImpl[]

      the change list in which to record the changes

    Returns number

    the next record index to process

toString

  • toString(): string
  • Convert the RecordV2DeltaImpl to a string

    Returns string

    a string representation of the buffer data

Static toString

  • toString(): string
  • Returns string

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.