Skip to content

Commit

Permalink
Merge pull request #17 from lenchvolodymyr/fix/remove-indexes
Browse files Browse the repository at this point in the history
remove indexes
  • Loading branch information
lenchvolodymyr authored Jan 22, 2021
2 parents 39796c9 + d8539e5 commit 78924f7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 96 deletions.
2 changes: 0 additions & 2 deletions forward_engineering/helpers/getIndexPolicyScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const getIncludedPath = (_) => (includedPaths = []) => {
return includedPaths.map(item => {
return _.flow(
add('path', getPath(item.indexIncludedPath)),
add('indexes', (item.inclIndexes || []).map(getIndex(_))),
)({});
}).filter(item => !_.isEmpty(item));
};
Expand All @@ -75,7 +74,6 @@ const getExcludedPath = (_) => (excludedPaths = []) => {
return excludedPaths.map(item => {
return _.flow(
add('path', getPath(item.indexExcludedPath)),
add('indexes', (item.exclIndexes || []).map(getIndex(_))),
)({});
}).filter(item => !_.isEmpty(item));
};
Expand Down
84 changes: 0 additions & 84 deletions properties_pane/container_level/containerLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,48 +312,6 @@ making sure that you maintain a proper JSON format.
}
}
},
{
"propertyName": "Indexes",
"propertyType": "group",
"propertyKeyword": "inclIndexes",
"shouldValidate": false,
"propertyTooltip": "",
"structure": [
{
"propertyName": "Kind",
"propertyKeyword": "kind",
"shouldValidate": false,
"propertyTooltip": "Index kind: Hash (equality queries), Range (equality, range or Order By queries), or Spatial (spatial queries)",
"propertyType": "select",
"options": [
"Hash",
"Range"
]
},
{
"propertyName": "Data type",
"propertyKeyword": "dataType",
"shouldValidate": false,
"propertyTooltip": "Data type: String, Number, Point, Polygon, or LineString (can contain only one entry per data type per path)",
"propertyType": "select",
"options": [
"String",
"Number"
]
},
{
"propertyName": "Precision",
"propertyKeyword": "indexPrecision",
"shouldValidate": false,
"propertyTooltip": "1-8 or -1 (Maximum precision) for numbers, 1-100 (Maximum precision) for string",
"propertyType": "numeric",
"valueType": "number",
"allowNegative": true,
"minValue": -1,
"maxValue": 100
}
]
},
{
"propertyName": "Description",
"propertyKeyword": "indexDescription",
Expand Down Expand Up @@ -407,48 +365,6 @@ making sure that you maintain a proper JSON format.
}
}
},
{
"propertyName": "Indexes",
"propertyType": "group",
"propertyKeyword": "exclIndexes",
"shouldValidate": false,
"propertyTooltip": "",
"structure": [
{
"propertyName": "Kind",
"propertyKeyword": "kind",
"shouldValidate": false,
"propertyTooltip": "Index kind: Hash (equality queries), Range (equality, range or Order By queries), or Spatial (spatial queries)",
"propertyType": "select",
"options": [
"Hash",
"Range"
]
},
{
"propertyName": "Data type",
"propertyKeyword": "dataType",
"shouldValidate": false,
"propertyTooltip": "Data type: String, Number, Point, Polygon, or LineString (can contain only one entry per data type per path)",
"propertyType": "select",
"options": [
"String",
"Number"
]
},
{
"propertyName": "Precision",
"propertyKeyword": "indexPrecision",
"shouldValidate": false,
"propertyTooltip": "1-8 or -1 (Maximum precision) for numbers, 1-100 (Maximum precision) for string",
"propertyType": "text",
"valueType": "number",
"allowNegative": true,
"minValue": -1,
"maxValue": 100
}
]
},
{
"propertyName": "Description",
"propertyKeyword": "indexDescription",
Expand Down
10 changes: 0 additions & 10 deletions reverse_engineering/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,14 +438,6 @@ function capitalizeFirstLetter(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}

function getRangeIndex(item) {
return {
kind: item.kind.toLowerCase() === 'hash' ? 'Hash' : 'Range',
dataType: capitalizeFirstLetter(item.dataType),
indexPrecision: !isNaN(Number(item.precision)) ? Number(item.precision) : -1,
};
}

function getIndexes(indexingPolicy){
return {
indexingMode: capitalizeFirstLetter(indexingPolicy.indexingMode || ''),
Expand All @@ -454,14 +446,12 @@ function getIndexes(indexingPolicy){
return {
name: `Included (${i + 1})`,
indexIncludedPath: [getIndexPath(index.path)],
inclIndexes: (index.indexes || []).map(getRangeIndex),
};
}),
excludedPaths: indexingPolicy.excludedPaths.map((index, i) => {
return {
name: `Excluded (${i + 1})`,
indexExcludedPath: [getIndexPath(index.path)],
exclIndexes: (index.indexes || []).map(getRangeIndex),
};
}),
spatialIndexes: (indexingPolicy.spatialIndexes || []).map((index, i) => {
Expand Down

0 comments on commit 78924f7

Please sign in to comment.