graflo.db.cypher.targets¶
The Cypher read behind fetch_edge_targets: the stored targets of each source.
The statement unwinds $data, a list of maps carrying a source's keys and
its position, so one statement serves a chunk of sources on Neo4j, Memgraph
and FalkorDB alike. Its columns are i (the position) and t0 .. tN
(the target's keys, in order).
Functions:¶
relationship_targets(read, source_label, target_label, relation, sources, source_keys, target_keys, chunk_size)
¶
Run :func:relationship_targets_query over sources, a chunk per statement.
read runs a statement with $data bound and returns its rows as
sequences in column order.
Source code in graflo/db/cypher/targets.py
relationship_targets_query(source_label, target_label, relation, source_keys, target_keys)
¶
The targets of the relationships of relation leaving each source of $data.
With no relation, every relationship from the source to the target.