Skip to content

Commit 1a4e92b

Browse files
committed
Fix for function parameter list
Signed-off-by: worksofliam <[email protected]>
1 parent 0d538af commit 1a4e92b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/views/types/function.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import Function from "../../database/callable";
33
import ParmTreeItem from "./ParmTreeItem";
44

55
export async function getChildren (schema: string, specificName: string): Promise<ParmTreeItem[]> {
6-
const parms = await Function.getParms(schema, specificName);
6+
const signatures = await Function.getSignaturesFor(schema, [specificName]);
7+
const allParms = signatures.map(signature => signature.parms).flat();
8+
const removedDupes = allParms.filter((parm, index) => {
9+
return allParms.findIndex(p => p.PARAMETER_NAME === parm.PARAMETER_NAME && p.DATA_TYPE === p.DATA_TYPE) === index;
10+
});
711

8-
return parms.map(parm => new ParmTreeItem(schema, specificName, parm));
12+
return removedDupes.map(parm => new ParmTreeItem(schema, specificName, parm));
913
}

0 commit comments

Comments
 (0)