diff --git a/forward_engineering/ddlProvider/ddlHelpers/columnDefinition/getColumnDefault.js b/forward_engineering/ddlProvider/ddlHelpers/columnDefinition/getColumnDefault.js index 0589127..837d3d5 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/columnDefinition/getColumnDefault.js +++ b/forward_engineering/ddlProvider/ddlHelpers/columnDefinition/getColumnDefault.js @@ -26,13 +26,14 @@ const isGeneratedAsIdentity = ({ identity, type }) => { * @param {{ start?: number, increment?: number, minValue?: number, maxValue?: number, cycle?: string }} param0 * @returns {string} */ -const getIdentityOptions = ({ start, increment, minValue, maxValue, cycle }) => { +const getIdentityOptions = ({ start, increment, minValue, maxValue, cycle, cache, cacheValue, order }) => { const startWith = start ? `START WITH ${start}` : ''; const incrementBy = increment ? `INCREMENT BY ${increment}` : ''; const minimumValue = minValue ? `MINVALUE ${minValue}` : ''; const maximumValue = maxValue ? `MAXVALUE ${maxValue}` : ''; + const cacheOption = cacheValue ? `CACHE ${cacheValue}` : cache; - return [startWith, incrementBy, cycle, minimumValue, maximumValue].filter(Boolean).join(', '); + return [startWith, incrementBy, cycle, minimumValue, maximumValue, cacheOption, order].filter(Boolean).join(', '); }; /** diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 44f3c15..8335ae4 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -1016,7 +1016,6 @@ making sure that you maintain a proper JSON format. "value": "decimal" } }, - { "propertyName": "Default", "propertyKeyword": "default", @@ -1237,6 +1236,65 @@ making sure that you maintain a proper JSON format. ] } } + }, + { + "propertyName": "Cache", + "propertyKeyword": "cache", + "propertyTooltip": "Specify how many values of the sequence the database preallocates and keeps in memory for faster access. Specify NOCACHE to indicate that values of the sequence are not preallocated. If you omit both CACHE and NOCACHE, then the database caches 20 sequence numbers by default.", + "propertyType": "select", + "options": ["", "CACHE", "NO CACHE"], + "dependency": { + "type": "not", + "values": { + "type": "or", + "values": [ + { + "key": "generated", + "exist": false + }, + { + "key": "generated", + "value": "" + } + ] + } + } + }, + { + "propertyName": "Cache value", + "propertyKeyword": "cacheValue", + "propertyType": "numeric", + "valueType": "number", + "propertyTooltip": "This integer value can have 28 or fewer digits. The minimum value for this parameter is 2.", + "minValue": 2, + "defaultValue": 20, + "dependency": { + "key": "cache", + "value": "CACHE" + } + }, + { + "propertyName": "Order", + "propertyKeyword": "order", + "propertyTooltip": "Specify ORDER to guarantee that sequence numbers are generated in order of request. Specify NO ORDER if you do not want to guarantee sequence numbers are generated in order of request.", + "propertyType": "select", + "options": ["", "ORDER", "NO ORDER"], + "dependency": { + "type": "not", + "values": { + "type": "or", + "values": [ + { + "key": "generated", + "exist": false + }, + { + "key": "generated", + "value": "" + } + ] + } + } } ], "dependency": {