summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-01-05 18:09:59 +0200
committerLV-426 <lv-426@taproot.org.il>2015-01-05 18:09:59 +0200
commit6b07eb0f2d83b390d790b8c0b5134b3181cd7ea4 (patch)
tree314137890dc71c84c9a5447db0274dd13cadba47 /src
parentf58c33584d93c8c3b8d275264d20089b9b8a6ce0 (diff)
DBO_rz_clone: filter meta nodes (nodes with meta labels) from result set
Diffstat (limited to 'src')
-rw-r--r--src/server/db_op.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/db_op.py b/src/server/db_op.py
index c360ce9d..a755293c 100644
--- a/src/server/db_op.py
+++ b/src/server/db_op.py
@@ -584,11 +584,12 @@ class DBO_rz_clone(DB_op):
self.skip = 0
q_arr = ['match (n)' if not filter_label else 'match (n:%s)' % (filter_label),
- 'optional match (n)-[r]->(m)',
- 'with n,r,m',
+ 'where 0 = length(filter(_lbl in labels(n) where _lbl =~ \'^__.*$\'))', # filter nodes with meta labels
+ 'with n',
'order by n.id',
'skip %d' % (self.skip),
'limit %d' % (self.limit),
+ 'optional match (n)-[r]->(m)',
'return n,labels(n),collect([m.id, r, type(r)])']
q = ' '.join(q_arr)