Skip to content

allow optional inputs to rules #30

Open
@dwiel

Description

@dwiel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions