Skip to content

Commit

Permalink
optimize query
Browse files Browse the repository at this point in the history
  • Loading branch information
YoanSallami committed Oct 9, 2023
1 parent f373757 commit 427525a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hybridagi/hybridstores/program_memory/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def add_programs(
self.query('MATCH (n:Program {name:"$program_name"})'+
'-[r:DEPENDS_ON]->(m) DELETE r')
self.set_content(program_name, program)
result = graph_program.query('MATCH (n:Program) RETURN n')
result = graph_program.query('MATCH (n:Program) RETURN n.name AS name')
dependencies[program_name] = []
if len(result.result_set) > 0:
for node in result.result_set[0]:
dependencies[program_name].append(node.properties["program"])
for name in result.result_set[0]:
dependencies[program_name].append(name)
indexes.append(program_name)
if self.verbose:
pbar.update(1)
Expand Down

0 comments on commit 427525a

Please sign in to comment.