Skip to content

Commit

Permalink
Use non-deprecated UserFunctionSignature constructor (#3017) NO AUTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Lojjs authored Jun 30, 2022
1 parent 738f191 commit 58ad50a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions full/src/main/java/apoc/custom/CypherProceduresHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ private UserFunctionDescriptor userFunctionDescriptor(Node node) {
inputs,
typeof((String) node.getProperty(SystemPropertyKeys.output.name())),
null,
new String[0],
description,
"apoc.custom",
false,
false,
false
), statement, forceSingle);
}
Expand Down Expand Up @@ -327,7 +328,7 @@ public ProcedureSignature procedureSignature(String name, String mode, List<List

public UserFunctionSignature functionSignature(String name, String output, List<List<String>> inputs, String description) {
AnyType outType = typeof(output.isEmpty() ? "LIST OF MAP" : output);
return new UserFunctionSignature(qualifiedName(name), inputSignatures(inputs), outType, null, new String[0], description, "apoc.custom",false);
return new UserFunctionSignature(qualifiedName(name), inputSignatures(inputs), outType, null, description, "apoc.custom", false, false, false);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions full/src/main/java/apoc/custom/Signatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public UserFunctionSignature toFunctionSignature(SignatureParser.FunctionContext
List<FieldSignature> inputSignatures = signature.parameter().stream().map(p -> getInputField(name(p.name()), type(p.type()), defaultValue(p.defaultValue(), type(p.type())))).collect(Collectors.toList());

String deprecated = "";
String[] allowed = new String[0];
boolean caseInsensitive = true;
return new UserFunctionSignature(name, inputSignatures, type, deprecated, allowed, description, "apoc.custom",caseInsensitive);
boolean isBuiltIn = false;
boolean internal = false;
return new UserFunctionSignature(name, inputSignatures, type, deprecated, description, "apoc.custom", caseInsensitive, isBuiltIn, internal);
}

private DefaultParameterValue defaultValue(SignatureParser.DefaultValueContext defaultValue, Neo4jTypes.AnyType type) {
Expand Down

0 comments on commit 58ad50a

Please sign in to comment.