Skip to content

Commit 7289432

Browse files
Merge pull request #4 from lenchvolodymyr/fix/remove-indexes
remove indexes
2 parents 5b1ae08 + 528f787 commit 7289432

File tree

3 files changed

+0
-105
lines changed

3 files changed

+0
-105
lines changed

forward_engineering/getIndexPolicyScript.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,10 @@ const getPath = (paths = []) => {
5353
}).concat(items[items.length - 1]).join('/');
5454
};
5555

56-
const getIndex = (_) => (item) => {
57-
const precision = Number(item.indexPrecision);
58-
return _.flow(
59-
add('kind', item.kind),
60-
add('dataType', item.dataType),
61-
add('precision', isNaN(precision) ? undefined : Number(precision)),
62-
)({});
63-
};
64-
6556
const getIncludedPath = (_) => (includedPaths = []) => {
6657
return includedPaths.map(item => {
6758
return _.flow(
6859
add('path', getPath(item.indexIncludedPath)),
69-
add('indexes', (item.inclIndexes || []).map(getIndex(_)).filter(index => !_.isEmpty(index))),
7060
)({});
7161
}).filter(item => !_.isEmpty(item));
7262
};
@@ -75,7 +65,6 @@ const getExcludedPath = (_) => (excludedPaths = []) => {
7565
return excludedPaths.map(item => {
7666
return _.flow(
7767
add('path', getPath(item.indexExcludedPath)),
78-
add('indexes', (item.exclIndexes || []).map(getIndex(_)).filter(index => !_.isEmpty(index))),
7968
)({});
8069
}).filter(item => !_.isEmpty(item));
8170
};

properties_pane/container_level/containerLevelConfig.json

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -305,48 +305,6 @@ making sure that you maintain a proper JSON format.
305305
}
306306
}
307307
},
308-
{
309-
"propertyName": "Indexes",
310-
"propertyType": "group",
311-
"propertyKeyword": "inclIndexes",
312-
"shouldValidate": false,
313-
"propertyTooltip": "",
314-
"structure": [
315-
{
316-
"propertyName": "Kind",
317-
"propertyKeyword": "kind",
318-
"shouldValidate": false,
319-
"propertyTooltip": "Index kind: Hash (equality queries), Range (equality, range or Order By queries), or Spatial (spatial queries)",
320-
"propertyType": "select",
321-
"options": [
322-
"Hash",
323-
"Range"
324-
]
325-
},
326-
{
327-
"propertyName": "Data type",
328-
"propertyKeyword": "dataType",
329-
"shouldValidate": false,
330-
"propertyTooltip": "Data type: String, Number, Point, Polygon, or LineString (can contain only one entry per data type per path)",
331-
"propertyType": "select",
332-
"options": [
333-
"String",
334-
"Number"
335-
]
336-
},
337-
{
338-
"propertyName": "Precision",
339-
"propertyKeyword": "indexPrecision",
340-
"shouldValidate": false,
341-
"propertyTooltip": "1-8 or -1 (Maximum precision) for numbers, 1-100 (Maximum precision) for string",
342-
"propertyType": "numeric",
343-
"valueType": "number",
344-
"allowNegative": true,
345-
"minValue": -1,
346-
"maxValue": 100
347-
}
348-
]
349-
},
350308
{
351309
"propertyName": "Description",
352310
"propertyKeyword": "indexDescription",
@@ -400,48 +358,6 @@ making sure that you maintain a proper JSON format.
400358
}
401359
}
402360
},
403-
{
404-
"propertyName": "Indexes",
405-
"propertyType": "group",
406-
"propertyKeyword": "exclIndexes",
407-
"shouldValidate": false,
408-
"propertyTooltip": "",
409-
"structure": [
410-
{
411-
"propertyName": "Kind",
412-
"propertyKeyword": "kind",
413-
"shouldValidate": false,
414-
"propertyTooltip": "Index kind: Hash (equality queries), Range (equality, range or Order By queries), or Spatial (spatial queries)",
415-
"propertyType": "select",
416-
"options": [
417-
"Hash",
418-
"Range"
419-
]
420-
},
421-
{
422-
"propertyName": "Data type",
423-
"propertyKeyword": "dataType",
424-
"shouldValidate": false,
425-
"propertyTooltip": "Data type: String, Number, Point, Polygon, or LineString (can contain only one entry per data type per path)",
426-
"propertyType": "select",
427-
"options": [
428-
"String",
429-
"Number"
430-
]
431-
},
432-
{
433-
"propertyName": "Precision",
434-
"propertyKeyword": "indexPrecision",
435-
"shouldValidate": false,
436-
"propertyTooltip": "1-8 or -1 (Maximum precision) for numbers, 1-100 (Maximum precision) for string",
437-
"propertyType": "text",
438-
"valueType": "number",
439-
"allowNegative": true,
440-
"minValue": -1,
441-
"maxValue": 100
442-
}
443-
]
444-
},
445361
{
446362
"propertyName": "Description",
447363
"propertyKeyword": "indexDescription",

reverse_engineering/api.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,6 @@ function capitalizeFirstLetter(str) {
553553
return str.charAt(0).toUpperCase() + str.slice(1);
554554
}
555555

556-
function getRangeIndex(item) {
557-
return {
558-
kind: item.kind.toLowerCase() === 'hash' ? 'Hash' : 'Range',
559-
dataType: capitalizeFirstLetter(item.dataType),
560-
indexPrecision: !isNaN(Number(item.precision)) ? Number(item.precision) : -1,
561-
};
562-
}
563-
564556
function getIndexes(indexingPolicy){
565557
return {
566558
indexingMode: capitalizeFirstLetter(indexingPolicy.indexingMode || ''),
@@ -569,14 +561,12 @@ function getIndexes(indexingPolicy){
569561
return {
570562
name: `Included (${i + 1})`,
571563
indexIncludedPath: [getIndexPath(index.path)],
572-
inclIndexes: (index.indexes || []).map(getRangeIndex),
573564
};
574565
}),
575566
excludedPaths: indexingPolicy.excludedPaths.map((index, i) => {
576567
return {
577568
name: `Excluded (${i + 1})`,
578569
indexExcludedPath: [getIndexPath(index.path)],
579-
exclIndexes: (index.indexes || []).map(getRangeIndex),
580570
};
581571
}),
582572
spatialIndexes: (indexingPolicy.spatialIndexes || []).map((index, i) => {

0 commit comments

Comments
 (0)