| 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 | |
|---|---|
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. |
| 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, 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 := 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.
| Member detail |
|---|
integer changeType
One of INSERT, REMOVE, UPDATE for rows being added, removed, updated.
string key
The key value for the changed row.
sequence<string> newFieldValues
New values of the row, or an empty sequence if not supported by this driver.
sequence<string> oldFieldValues
Old values of the row, or an empty sequence if not supported by this driver.
string storeName
Name of the store that the table is in.
string tableName
Name 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 | ||||||