Skip to content

Commit 407bd07

Browse files
authored
Merge pull request #1054 from marklogic/revert_new_optic_changes
MLE-12345: revert new optic changes
2 parents 4fd639b + 5518e9c commit 407bd07

11 files changed

Lines changed: 65 additions & 1003 deletions

lib/plan-builder-base.js

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
2+
* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
33
*/
44
'use strict';
55

@@ -58,11 +58,8 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
5858
} else if (arg instanceof Number || arg instanceof Boolean || arg instanceof String) {
5959
arg = arg.valueOf();
6060
} else if (arg instanceof types.ServerType) {
61-
// We added new VecVector ServerType which is not a sub-type of Item. This makes it a one-off type
62-
// as paramTypes will not include VecVector in any other type checks.
63-
// And if we get here the arg must be and only be a VecVector (arg._ns === 'vec') or we throw an Error
6461
if(arg._ns === 'vec'){
65-
return arg;
62+
return arg._args;
6663
}
6764
throw new Error(
6865
`${argLabel(funcName, paramName, argPos)} must have type ${typeLabel(paramTypes)}`
@@ -404,26 +401,6 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
404401
});
405402
}
406403
return true;
407-
case 'PlanTransitiveClosureOptions':
408-
const planTransitiveClosureOptionsSet = new Set(['minLength', 'min-length', 'maxLength', 'max-length']);
409-
if(Object.getPrototypeOf(arg) === Map.prototype){
410-
arg.forEach((value, key) => {
411-
if(!planTransitiveClosureOptionsSet.has(key)) {
412-
throw new Error(
413-
`${argLabel(funcName, paramName, argPos)} has invalid key- ${key}`
414-
);
415-
}
416-
});
417-
} else if (typeof arg === 'object') {
418-
Object.keys(arg).forEach(key => {
419-
if(!planTransitiveClosureOptionsSet.has(key)) {
420-
throw new Error(
421-
`${argLabel(funcName, paramName, argPos)} has invalid key- ${key}`
422-
);
423-
}
424-
});
425-
}
426-
return true;
427404
default:
428405
return false;
429406
}

lib/plan-builder-generated.js

Lines changed: 6 additions & 265 deletions
Large diffs are not rendered by default.

test-app/src/main/ml-data/optic/transitive-closure/collections.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

test-app/src/main/ml-data/optic/transitive-closure/permissions.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

test-app/src/main/ml-data/optic/transitive-closure/transClosureTripleSet.xml

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)