Graphcore is a python library which allows you to query a computational graph structure backed by multiple databases, python functions and/or 3rd party services
11
stars
2
forks
source link
allow rule to raise NoResult to indicate that for the given inputs, a particular rule can not return an output #36
This is useful in the case of a SQLQuery where the constraint is moved into the query and out of graphcore. In this case the graphcore rule needs to be able to tell graphcore that the inputs have no valid output and so filter the results. There are other cases where this may be desirable. For example, in the query:
{
'user.id': 1,
'user.parent.name?': None,
}
it is possible that the user has no parent entered and so just by asking for the parent you are constraining the set of users.
This is useful in the case of a SQLQuery where the constraint is moved into the query and out of graphcore. In this case the graphcore rule needs to be able to tell graphcore that the inputs have no valid output and so filter the results. There are other cases where this may be desirable. For example, in the query:
it is possible that the user has no parent entered and so just by asking for the parent you are constraining the set of users.