Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow optional inputs to rules #30

Open
dwiel opened this issue Dec 23, 2015 · 0 comments
Open

allow optional inputs to rules #30

dwiel opened this issue Dec 23, 2015 · 0 comments

Comments

@dwiel
Copy link
Owner

dwiel commented Dec 23, 2015

I didn't used to think this would be possible without significantly increasing the complexity of the search. However, now it appears that an optional input could be achieved by essentially forking the query, adding the optional input as a required input, and attempting to fulfill that clause. If it can not be fulfilled, then it isn't available and the rule should use the default value. Because there is only ever one rule which can be used to fulfill any given clause, this search can be done independently from the rest of the search space. The order that optional clauses are resolved will have no effect on the result of the search.

This will still most likely require a bit of a refactor to allow this kind of potentially unsuccessful fork of the query search. It will also be difficult to run this subquery efficiently, so that it doesn't wind up fulfilling all of the other clauses yet to be completed in the query.

@dwiel dwiel changed the title allow optional inputs allow optional inputs to rules Dec 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant