9.2.4.7 Column Rules

A column rule must be a sub rule of an operation rule. In addition to the standard rule properties, a column rule should also define the following through XPath or other expressions.

  • name – The name of the column within the table definition.

  • index – The index of the column within the table definition.

    Note:

    If only one of name and index is defined, the other will be determined.

  • before.value – The before value of the column. This is required for deletes, but is optional for updates.

  • before.isnull – Indicates whether the before value of the column is null.

  • before.ismissing – Indicates whether the before value of the column is missing.

  • after.value – The before value of the column. This is required for deletes, but is optional for updates.

  • after.isnull – Indicates whether the before value of the column is null.

  • after.ismissing – Indicates whether the before value of the column is missing.

  • value – An expression to use for both before.value and after.value unless overridden by specific before or after values. Note that this does not support different before values for updates.

  • isnull – An expression to use for both before.isnull and after.isnull unless overridden.

  • ismissing – An expression to use for both before.ismissing and after.ismissing unless overridden.

The following example dynamically obtains column information from the /Column element of an /Operation

Example 9-12 Dynamic Extraction of Column Information

dyncolrule.match=./Column
dyncolrule.name=@name
dyncolrule.before.value=./beforevalue/text()
dyncolrule.after.value=./aftervalue/text()

The following example statically matches the /KeyCol and /Col1 elements to columns in MY.TABLE.

Example 9-13 Static Matching of Elements to Columns

statkeycolrule.match=/KeyCol
statkeycolrule.name="keycol"
statkeycolrule.value=./text()
statcol1rule.match=/Col1
statcol1rule.name="col1"
statcol1rule.value=./text()