Dataset Transformations
Dataset Transformations
Refer back to the original boat_class.xml
example given earlier in this document. It used Jarvis transform
configurations to ensure that empty strings were always written as NULL
to the database, and that NULL
values in the database were always given as empty string to the client.
This allows the client to be confident that empty values were always represented in a consistent manner. The alternative is to explicitly code this into the SQL statements in the dataset, e.g. with NULLIF
, COALESCE
, BTRIM
, etc.
The <transform>
element allows you configure transforms for store
and fetch
. The attribute value is a comma-separated list of transformations to apply when fetching (select
) and when storing (insert
, update
, delete
).
The following are currently supported and are applied in this order:
Transformation | Notes |
---|---|
trim |
Leading and trailing spaces will be removed. |
null |
Empty strings will be converted to NULL . Occurs after trimming. |
notnull |
NULL values will be converted to empty string. |
word2html |
Convert MS Word Unicode and 8-bit character to HTML to ensure no binary content in the string. Will brute-force convert characters we don’t recognize. |