Closed jefferis closed 4 years ago
Also I see that there are currently two separate calls for pre/post
@alexanderbates / @schlegelp do you know if this is actually necessary because of the DISTINCT(ids) clause or could we fetch in one go?
Closed by #96
Note to self that this should do both at once:
cypher.both = sprintf(paste("WITH %s AS bodyIds UNWIND bodyIds AS bodyId",
"MATCH (a:`%s`)-[:Contains]->(c:SynapseSet)-[:Contains]->(s:Synapse)-[:SynapsesTo]-(:Synapse)-[:Contains]-(:SynapseSet)<-[:Contains]-(b:`%s`)",
"WHERE a.bodyId=bodyId %s",
"RETURN DISTINCT id(s) AS connector_id,",
"s.type AS prepost, s.location.x AS x ,s.location.y AS y, s.location.z AS z,",
"s.confidence AS confidence, a.bodyId AS bodyid, b.bodyId AS partner"),
id2json(bodyids),
"Segment",
"Segment",
roi)
modulo some reordering to ensure results match.