From c27a7c713f67524c9dbfcbad08ccb337d1b2bdb0 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Sun, 4 Jan 2015 23:12:38 +0200 Subject: use meta attribute '__' prefix for __HEAD, __Parent, __Commit labels --- src/server/db_op.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/db_op.py b/src/server/db_op.py index fa5e8ed9..4ab4390e 100644 --- a/src/server/db_op.py +++ b/src/server/db_op.py @@ -107,6 +107,12 @@ class DB_composed_op(DB_op): return ret class DBO_chain_commit_block(DB_op): + """ + Labels in use: + - __HEAD: HEAD commit, unique + - __Parent: parent commit relationship + - __Commit: node type + """ @staticmethod def calc_blob_hash(blob): @@ -128,8 +134,8 @@ class DBO_chain_commit_block(DB_op): hash_value = DBO_chain_commit_block.calc_blob_hash(blob_obj) q_arr = ["match (old_head:__HEAD:__Commit)", "create (new_head:__HEAD:__Commit {hash: {hash_value}, blob: {blob_value}})", - "create new_head-[l:__Parent]->old_head", - "remove old_head:HEAD", + "create new_head-[r:__Parent]->old_head", + "remove old_head:__HEAD", "return old_head, new_head"] q = " ".join(q_arr) -- cgit v1.3.1