summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-01-05 20:24:25 +0200
committerLV-426 <lv-426@taproot.org.il>2015-01-06 17:30:14 +0200
commit7cb5267a7e79028b74aabb6237e2510b262ce591 (patch)
tree07cdf6a81c99bff60d9569b381f02b6fd7c52f08
parentad5d358b20b2db90fc60b86ab4156f2a7552a2ca (diff)
DB_Query class
-rw-r--r--src/server/neo4j_util.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/server/neo4j_util.py b/src/server/neo4j_util.py
index 7695ac69..3ec9b857 100644
--- a/src/server/neo4j_util.py
+++ b/src/server/neo4j_util.py
@@ -22,6 +22,20 @@ class Neo4JException(Exception):
def __str__(self):
return 'neo4j error set: ' + str(self.error_set)
+class DB_Query(object):
+
+ def __init__(self, q_str_or_array, param_set):
+ """
+ @param q_str_or_array: cypher query to add - if passed as an array ' '.join(q_str_or_array)
+ is used to convert it to string type
+ """
+ if type(q_str_or_array) is list:
+ q_str_or_array = ' '.join(q_str_or_array)
+
+ q_str = q_str_or_array
+ self.statement = q_str
+ self.param_set = param_set
+
class DB_row(object):
def __init__(self, data):
self.data = data