Skip to content

Commit

Permalink
0001558: Add the ability to use the old column value to the list of v…
Browse files Browse the repository at this point in the history
…ariable column transform options
  • Loading branch information
mhanes committed Feb 3, 2014
1 parent f30d134 commit 05274bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions symmetric-assemble/src/docbook/configuration.xml
Expand Up @@ -1828,9 +1828,9 @@ is the current system date and time,
<code>source_node_id</code>
is the node id of the source,
<code>target_node_id</code>
is the node id of the target, and
is the node id of the target,
<code>null</code>
is a null value.
is a null value, and <code>old_column_value</code> is the column's old value prior to the DML operation.
</listitem>

<listitem>Additive Transform ('additive'): This
Expand Down
Expand Up @@ -47,8 +47,10 @@ public class VariableColumnTransform implements ISingleValueColumnTransform, IBu

protected static final String OPTION_NULL = "null";

protected static final String OPTION_OLD_VALUE = "old_column_value";

private static final String[] OPTIONS = new String[] { OPTION_TIMESTAMP, OPTION_DATE,
OPTION_SOURCE_NODE_ID, OPTION_TARGET_NODE_ID, OPTION_NULL };
OPTION_SOURCE_NODE_ID, OPTION_TARGET_NODE_ID, OPTION_NULL, OPTION_OLD_VALUE };

public String getName() {
return NAME;
Expand Down Expand Up @@ -79,7 +81,9 @@ public String transform(IDatabasePlatform platform,
} else if (varName.equalsIgnoreCase(OPTION_SOURCE_NODE_ID)) {
return context.getBatch().getSourceNodeId();
} else if (varName.equalsIgnoreCase(OPTION_TARGET_NODE_ID)) {
return context.getBatch().getTargetNodeId();
return context.getBatch().getTargetNodeId();
} else if (varName.equalsIgnoreCase(OPTION_OLD_VALUE)) {
return oldValue;
} else if (varName.equals(OPTION_NULL)) {
return null;
}
Expand Down

0 comments on commit 05274bd

Please sign in to comment.