Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ const toUpperCase = value => toUpper(value);
const getUpperCaseValue = prefix => getBasicValue({ prefix, modifier: toUpperCase });

/**
* Build index key list clause. The model stores the order as `ascending`/`descending`, which Db2 for z/OS spells
* `ASC`/`DESC`.
* Build index key list clause.
*
* @param {IndexKeyRef[]} [keys] Index keys.
* @returns {string} Keys clause.
Expand Down
3 changes: 1 addition & 2 deletions forward_engineering/utils/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ const columnMapToString = ({ name }) => wrapInQuotes(name ?? '');
* @returns {string} Column expression.
*/
const columnMapToStringWithOrder = ({ name, type }) => {
const order = type === 'descending' ? ' DESC' : type === 'ascending' ? ' ASC' : '';
return wrapInQuotes(name) + order;
return [wrapInQuotes(name), type].filter(Boolean).join(' ');
};

/**
Expand Down
2 changes: 1 addition & 1 deletion properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ making sure that you maintain a proper JSON format.
"propertyTooltip": "Index key columns with ASC, DESC, or RANDOM ordering.",
"propertyType": "fieldList",
"template": "orderedList",
"attributeList": ["asc", "desc", "random"],
"attributeList": ["", "ASC", "DESC", "RANDOM"],
"validation": {
"minLength": 1,
"required": true
Expand Down