neo4j-apoc-procedures
neo4j-apoc-procedures copied to clipboard
Fixes #2978: The apoc.custom.declareProcedure does not accept default string values
Fixes #2978
- Updated
SIGNATURE_SYNTAX_ERROR
- Fixed default string handling
- Added
getDefaultParameterValue
to differentiate between plain text and other data types
With these changes the apoc.custom.declareFunction/Procedure
should be able to accept any kind of default value, except for float
type fixed here.
The reason for originally leaving it out in the parser was that the default signature output doesn't put quotes around strings, which made it too hard to parse for me.
The reason for originally leaving it out in the parser was that the default signature output doesn't put quotes around strings, which made it too hard to parse for me.
@jexp Just to be sure, so do you think the changes are ok? Or should I change them in another way?
Anyway, the pr change the Signature.g4
placed in core
, but indeed this file is only called by Signature.java
(in full
),
therefore since we are not changing core
functionality, I think it may be mergeable.
@Lojjs we should still adjust the grammar file in core. (And possible also fix the signature output in cypher for strings)
Actually @vga91 @Lojjs we should move the grammar file to extended as it's not used anywhere in core, at least not to my knowledge.
Actually @vga91 @Lojjs we should move the grammar file to extended as it's not used anywhere in core, at least not to my knowledge.
I will move it as part of this PR in dev: https://github.com/neo4j/apoc/pull/261. So if you can do your cherry-pick after that goes in, that would be good. Otherwise there is a risk I will write over your changes to the file by moving it