Skip to content

Commit 563e1cc

Browse files
committed
Fixed CLI tool
1 parent 3bcf16b commit 563e1cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

neo4j/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ def main():
6262
for _ in range(args.times):
6363
for statement in args.statement:
6464
try:
65-
result = session.run(statement, parameters)
65+
cursor = session.run(statement, parameters)
6666
except CypherError as error:
6767
stderr.write("%s: %s\r\n" % (error.code, error.message))
6868
else:
6969
if not args.quiet:
7070
has_results = False
71-
for i, record in enumerate(result):
71+
for i, record in enumerate(cursor.records()):
7272
has_results = True
7373
if i == 0:
74-
stdout.write("%s\r\n" % "\t".join(record.__keys__))
74+
stdout.write("%s\r\n" % "\t".join(record.keys()))
7575
stdout.write("%s\r\n" % "\t".join(map(repr, record)))
7676
if has_results:
7777
stdout.write("\r\n")
7878
if args.summarize:
79-
summary = result.summarize()
79+
summary = cursor.summarize()
8080
stdout.write("Statement : %r\r\n" % summary.statement)
8181
stdout.write("Parameters : %r\r\n" % summary.parameters)
8282
stdout.write("Statement Type : %r\r\n" % summary.statement_type)

0 commit comments

Comments
 (0)