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
27 changes: 2 additions & 25 deletions lib/plan-builder-base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
'use strict';

Expand Down Expand Up @@ -58,11 +58,8 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
} else if (arg instanceof Number || arg instanceof Boolean || arg instanceof String) {
arg = arg.valueOf();
} else if (arg instanceof types.ServerType) {
// We added new VecVector ServerType which is not a sub-type of Item. This makes it a one-off type
// as paramTypes will not include VecVector in any other type checks.
// And if we get here the arg must be and only be a VecVector (arg._ns === 'vec') or we throw an Error
if(arg._ns === 'vec'){
return arg;
return arg._args;
}
throw new Error(
`${argLabel(funcName, paramName, argPos)} must have type ${typeLabel(paramTypes)}`
Expand Down Expand Up @@ -404,26 +401,6 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
});
}
return true;
case 'PlanTransitiveClosureOptions':
const planTransitiveClosureOptionsSet = new Set(['minLength', 'min-length', 'maxLength', 'max-length']);
if(Object.getPrototypeOf(arg) === Map.prototype){
arg.forEach((value, key) => {
if(!planTransitiveClosureOptionsSet.has(key)) {
throw new Error(
`${argLabel(funcName, paramName, argPos)} has invalid key- ${key}`
);
}
});
} else if (typeof arg === 'object') {
Object.keys(arg).forEach(key => {
if(!planTransitiveClosureOptionsSet.has(key)) {
throw new Error(
`${argLabel(funcName, paramName, argPos)} has invalid key- ${key}`
);
}
});
}
return true;
default:
return false;
}
Expand Down
271 changes: 6 additions & 265 deletions lib/plan-builder-generated.js

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading