FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |
integer positionRowId := tbl.getFieldIndex("position");
RowChanged rowChanged;
on all RowChanged(storeName = STORE,
tableName = TABLE):rowChanged {
// we handle things simply by treating an update as a remove followed by an insert:
if (rowChanged.changeType = RowChanged.REMOVE or
rowChanged.changeType = RowChanged.UPDATE) {
position := position - float.parse(rowChanged.oldFieldValues[positionRowId]);
}
if rowChanged.changeType = RowChanged.INSERT or
rowChanged.changeType = RowChanged.UPDATE {
position := position + float.parse(rowChanged.newFieldValues[positionRowId]);
}
log "Position is now "+position.toString();
}
Constant Summary | |
---|---|
constant integer | INSERT := 1
Value for changeType when a row is added to a table. |
constant integer | REMOVE := 2
Value for changeType when a row is removed from a table. |
constant integer | UPDATE := 3
Value for changeType when a row is modified in a table. |
Member Summary | |
---|---|
integer | changeType
One of INSERT, REMOVE, UPDATE for rows being added, removed, updated. |
string | storeName
Name of the store that the table is in. |
string | tableName
Name of the table that the row is in. |
string | key
The key value for the changed row. |
sequence<string > | oldFieldValues
Old values of the row, if available. |
sequence<string > | newFieldValues
New values of the row. |
Action Summary | |
---|---|
string |
getChangeTypeString()
Get a display string representing this event's change type. |
Constant Detail |
---|
constant integer INSERT := 1Value for changeType when a row is added to a table.
constant integer REMOVE := 2Value for changeType when a row is removed from a table.
constant integer UPDATE := 3Value for changeType when a row is modified in a table.
Member Detail |
---|
integer changeTypeOne of INSERT, REMOVE, UPDATE for rows being added, removed, updated.
string keyThe key value for the changed row.
sequence<string > newFieldValuesNew values of the row.
sequence<string > oldFieldValuesOld values of the row, if available.
string storeNameName of the store that the table is in.
string tableNameName of the table that the row is in.
Action Detail |
---|
string getChangeTypeString()Get a display string representing this event's change type.
FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |