CrudEntry
A single client-side change.
Constructors
new CrudEntry()
new CrudEntry(
clientId,
op,
table,
id,
transactionId?,
opData?): CrudEntry
Parameters
Parameter | Type |
---|---|
clientId | number |
op | UpdateType |
table | string |
id | string |
transactionId ? | number |
opData ? | Record <string , any > |
Returns
Properties
Property | Type | Description |
---|---|---|
clientId | number | Auto-incrementing client-side id. |
id | string | ID of the changed row. |
op | UpdateType | Type of change. |
opData? | Record <string , any > | Data associated with the change. |
table | string | Table that contained the change. |
transactionId? | number | Auto-incrementing transaction id. This is the same for all operations within the same transaction. |
Methods
equals()
equals(entry): boolean
Parameters
Parameter | Type |
---|---|
entry | CrudEntry |
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
Parameter | Type |
---|---|
dbRow | CrudEntryJSON |