Skip to main content

CrudEntry

A single client-side change.

Constructors

new CrudEntry()

new CrudEntry(
clientId,
op,
table,
id,
transactionId?,
opData?): CrudEntry

Parameters

ParameterType
clientIdnumber
opUpdateType
tablestring
idstring
transactionId?number
opData?Record<string, any>

Returns

CrudEntry

Properties

PropertyTypeDescription
clientIdnumberAuto-incrementing client-side id.
idstringID of the changed row.
opUpdateTypeType of change.
opData?Record<string, any>Data associated with the change.
tablestringTable that contained the change.
transactionId?numberAuto-incrementing transaction id. This is the same for all operations within the same transaction.

Methods

equals()

equals(entry): boolean

Parameters

ParameterType
entryCrudEntry

Returns

boolean


hashCode()

hashCode(): string

The hash code for this object.

Returns

string

Deprecated

This should not be necessary in the JS SDK. Use the

See

CrudEntry#equals method instead. TODO remove in the next major release.


toComparisonArray()

toComparisonArray(): (undefined | string | number | Record<string, any>)[]

Generates an array for use in deep comparison operations

Returns

(undefined | string | number | Record<string, any>)[]


toJSON()

toJSON(): CrudEntryOutputJSON

Converts the change to JSON format.

Returns

CrudEntryOutputJSON


fromRow()

static fromRow(dbRow): CrudEntry

Parameters

ParameterType
dbRowCrudEntryJSON

Returns

CrudEntry