Bug resolved, query execution without transactions.
Reviewers: buda Reviewed By: buda Subscribers: matej.gradicek Differential Revision: https://phabricator.memgraph.io/D183
This commit is contained in:
parent
00b85302b0
commit
a07bb48a7a
@ -18,6 +18,12 @@ def query(q, context, params={}):
|
||||
session = driver.session()
|
||||
try:
|
||||
# executing query
|
||||
results = session.run(q, params)
|
||||
summary = results.summary()
|
||||
if not context.config.no_side_effects:
|
||||
add_side_effects(context, summary.counters)
|
||||
results_list = list(results)
|
||||
"""
|
||||
with session.begin_transaction() as tx:
|
||||
results = tx.run(q, params)
|
||||
summary = results.summary()
|
||||
@ -25,6 +31,10 @@ def query(q, context, params={}):
|
||||
add_side_effects(context, summary.counters)
|
||||
results_list = list(results)
|
||||
tx.success = True
|
||||
|
||||
This code snippet should replace code which is now
|
||||
executing queries when session.transactions will be supported.
|
||||
"""
|
||||
session.close()
|
||||
except Exception as e:
|
||||
# exception
|
||||
|
@ -44,7 +44,7 @@ def create_graph(name, context):
|
||||
i += 2
|
||||
else:
|
||||
q += ch
|
||||
if in_string and q_mark == ch:
|
||||
if in_string and ch in q_marks:
|
||||
in_string = False
|
||||
elif ch in q_marks:
|
||||
in_string = True
|
||||
|
Loading…
Reference in New Issue
Block a user