summaryrefslogtreecommitdiff
path: root/src/server/db_op.py
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-01-04 23:12:38 +0200
committerLV-426 <lv-426@taproot.org.il>2015-01-05 01:11:44 +0200
commitc27a7c713f67524c9dbfcbad08ccb337d1b2bdb0 (patch)
treed80dcc67330b5b599c9ab3ddbfe1aee3e6b9188d /src/server/db_op.py
parent8c2418db15f44f5e5bc23dc8cd1193ff0d52ce16 (diff)
use meta attribute '__' prefix for __HEAD, __Parent, __Commit labels
Diffstat (limited to 'src/server/db_op.py')
-rw-r--r--src/server/db_op.py10
1 files changed, 8 insertions, 2 deletions
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)