0

我有 2 个结构化节点类:

class Job(StructuredNode):
    uid = UniqueIdProperty()
    options = JSONProperty()
    pipeline = RelationshipTo(
        "Pipeline",
        "RUN_PIPELINE",
        cardinality=cardinality.One
    )

class Pipeline(StructuredNode):
    uid = UniqueIdProperty()
    name = StringProperty(unique_index=True)
    jobs = RelationshipFrom(
        "Job",
        "RUN_PIPELINE",
        cardinality=cardinality.ZeroOrMore
    )

当我使用以下查询在 python 中查询时:

MATCH (job:`Job`)-[:`RUN_PIPELINE`]->(pipeline:`Pipeline`)
WITH count(DISTINCT job) AS total, job
SKIP 0 LIMIT 20
 RETURN total, job

我能够从作业中检索数据,但我的管道是空的,我还想如何检索管道数据?

        for row in results:
            total, instance_data = row
            instance = self.model.inflate(instance_data)
            instances.append(instance)
            total = int(total)
4

0 回答 0