FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | FIELD | ACTION | DETAIL: IMPORT | CONSTANT | FIELD | 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 | |
---|---|
integer | INSERT := 1 Value for changeType when a row is added to a table. |
integer | REMOVE := 2 Value for changeType when a row is removed from a table. |
integer | UPDATE := 3 Value for changeType when a row is modified in a table. |
Field 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, or an empty sequence if not supported by this driver. |
sequence<string> | newFieldValues New values of the row, or an empty sequence if not supported by this driver. |
Action summary | |
---|---|
string |
getChangeTypeString() Get a display string representing this event's change type. |
Constant detail |
---|
integer INSERT := 1Value for changeType when a row is added to a table.
integer REMOVE := 2Value for changeType when a row is removed from a table.
integer UPDATE := 3Value for changeType when a row is modified in a table.
Field 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, or an empty sequence if not supported by this driver.
sequence<string> oldFieldValuesOld values of the row, or an empty sequence if not supported by this driver.
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 | FIELD | ACTION | DETAIL: IMPORT | CONSTANT | FIELD | ACTION |