CrudEntry
A single client-side change.
Properties
| Property | Type | Description |
|---|---|---|
clientId | number | Auto-incrementing client-side id. |
id | string | ID of the changed row. |
metadata? | string | Client-side metadata attached with this write. This field is only available when the trackMetadata option was set to true when creating a table and the insert or update statement set the _metadata column. |
op | UpdateType | Type of change. |
opData? | Record<string, any> | Data associated with the change. |
previousValues? | Record<string, any> | For tables where the trackPreviousValues option has been enabled, this tracks previous values for UPDATE and DELETE statements. |
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
toComparisonArray()
toComparisonArray(): unknown[];
Generates an array for use in deep comparison operations
Returns
unknown[]
toJSON()
toJSON(): unknown;
Converts the change to JSON format.
Returns
unknown