dwiel / graphcore

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 creating many to one rules #37

Open dwiel opened 8 years ago

dwiel commented 8 years ago

For example:

gc.rule(['person.children.id', 'person.children.age'], 'person.oldest_child.id', cardinality='many-to-one')
def person_oldest_child(ids, ages):
    return argmax(ages, ids)

In this case, would a query which also fetches children and constrains them affect the oldest_child?