Add option to allow empty parameter value #2419
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem to tackle
The default value of parameter.
We have this page about default value in knowledge base.
But since we currently don't allow null value, there has to be some value filled in first as an indicator of using default value.
I think using null for that is just more intuitive.
The fix here
Add an 'Allow empty' option to parameter setting
Functionality
Query like this
Could work without preset value for parameter now
New challenge
Empty value handling might be difficult and generate a lot of syntax error. We might want a better error message to help editor get the query right.
Also, if this is merged, I'll try to update the website for new example of usage.