|
@@ -283,8 +283,12 @@ def label_list(skip_count, page_size, en_name_filter=None,
|
|
cql = f"""
|
|
cql = f"""
|
|
MATCH (n:data_label)
|
|
MATCH (n:data_label)
|
|
WHERE {where_str}
|
|
WHERE {where_str}
|
|
- RETURN properties(n) as properties,n.time as time,elementId(n) as nodeid,
|
|
|
|
- COUNT((()-[]->(n))) + COUNT(((n)-[]->())) as relationship_count
|
|
|
|
|
|
+ WITH n, properties(n) as properties, n.time as time, elementId(n) as nodeid
|
|
|
|
+ OPTIONAL MATCH (n)<-[r]-()
|
|
|
|
+ WITH n, properties, time, nodeid, count(r) as incoming
|
|
|
|
+ OPTIONAL MATCH (n)-[r]->()
|
|
|
|
+ WITH n, properties, time, nodeid, incoming, count(r) as outgoing
|
|
|
|
+ RETURN properties, time, nodeid, incoming + outgoing as relationship_count
|
|
ORDER BY time desc
|
|
ORDER BY time desc
|
|
SKIP $skip_count
|
|
SKIP $skip_count
|
|
LIMIT $page_size
|
|
LIMIT $page_size
|