Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RecordV2DeltaImpl

Implementation of RecordV2Delta

Hierarchy

  • any
    • RecordV2DeltaImpl

Implements

Index

Constructors

constructor

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

    Parameters

    • buffer: Buffer

      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

Private Optional 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 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

changes

  • inheritdoc

    Parameters

    Returns ChangeImpl[]

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(): any
  • Convert the RecordV2DeltaImpl to a string

    Returns any

    a string representation of the buffer data